add support for multiple PlantUML views
anb0s opened this issue ยท 8 comments
I have made a pre-release available at http://files.idi.ntnu.no/publish/plantuml-pre/repository/ that includes preliminary support for pinning a view to a specific editor. Is this what you had in mind? I have not yet implemented means for creating multiple views. Should this happen automatically when you pin a view or should there be a "spawn new view" button?
Wow, great!
Pinning is working like expected, just two points:
- it would be good to see the pinned resource (workspace path) in the PlantUML view, may be in the tooltip of the view or in header or status line
- additionally it would be perfect to have "Jump to" or "Open" and "Show In" buttons that puts to front or opens the resource editor or selects the pinned resource in Project Explorer
The creating of new view should be done explicitly with a button, like in Console View:
Thanks!
I've made another pre-release available, that sets the tooltip of the pin button to indicate the file it is pinned to and that includes a button for opening new views.
Multiple views are working! I'm very happy with this now :) Thanks!
Some investigations so far:
- not a problem, just for your information: after updating the plugin and restarting Eclipse the tooltip of the Pin button showed always "Pin view to editor" independent of selected resource an pin-state instead of "Pinned to ...". The new created view shows the tooltip like expected: pinned with "Pinned to ..." and not pinned "Pin view to editor". I closed the "old" view and create new one which was OK then. May be just some view persistence effect?
- After pinning a view to one resource, the tool tip shows the right resource path. If the resource (editor) is closed the path is still good. If other editor without @startuml comments is in front and i press the Pin button twice (disable and enable again) then the image is still from the "previous" editor but the "Pinned to ..." message shows the path to active editor that is not related to the image anymore. It may confuse the user, but i have no idea how it can be solved without clear the image if user pins to editor without PlantUML content... may be ask user if the "old" resource should be (re)pinned again or the new resorce should be pinned and clear the image then...
From my point of view the issue solved with described corner cases. I will create separate enhancement requests for the "Open / Jump to/ Show In" feature described above and drag&drop support as nice to have. Thank You again!
I also noticed the first problem you mentioned above, I think it's because I changed slightly the persisted state of the view. Concerning the latter problem, it's not always obvious of when the view should be cleared, and I haven't systematically considered all cases. I'll close this issue after the next release, and then you and others can create new issues where details can be discussed.
My colleagues are asking me about this enhancement, should i recommend the test build you provided here or should we wait for the official release? Thank You!
It will be part of a new release coming very soon.