|opening a new diagram editor after closing the current editor [message #1710115]
||Sun, 04 October 2015 14:43
| Jack Webber
Registered: October 2015
I subclassed DiagramEditor and overrode init method..I import the xpdl onto the diagram when the user just opens the xpdl with graphiti diagram editor.|
I reload the diagram again when the user opens the xpdl again by importing the xpdl in the code.but eclipse opens multiple tabs.I want only one tab to be opened.I use DiagramEditorMatchingStrategy in plugin.xml.It works when I click the .diagram file every time.I want it to work for .xpdl.
So I decided to use workBenchPart.getPage.findEditor(EditorInput) to close the existing editor and open a fresh one.It works but the action tool bar is disabled.No undo, copy, paste or zoom in , zoom out options.But when I click outside the diagram and click back on the diagram the action bar features are enabled.
I overrode selectionChanged method to see if that was the issue.I overrode the method and return nothing still it works the same way.
I tried option 2 .I delete the existing file by searching for the file in workspace and open a fresh diagram by importing the xpdl.Somehow the newly opened editor's hascode is the same as the deleted diagram's hashcode.The same issue of action bar disabled for option 2.
In other words, what i really want is close the current diagram editor and open new diagram editor when the user opens the xpdl.
[Updated on: Tue, 06 October 2015 06:28]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02071 seconds