|Undo in a MultiPageEditor environment [message #1017921]
||Tue, 12 March 2013 15:59
| Vitor Enio
Registered: June 2012
I'm trying to implement an Undo/Redo behavior in a MultiPageEditor environment. The scenario consists in an editor that represents a Process and an element that represents a Subprocess. By doubleclicking the subprocess element another editor page is created and activated. At this point I can edit the contents of the subprocess only.
So, when I edit anything at this editor page, everything is Ok. Undo/Redo works fine. The problem is when I came back to the subprocess "parent" editor , the Process editor: trying to do any change that triggers an Undo/Redo action will throw an NPE (stack is attached).
Debuggin GEF/Graphiti internals, I found out that by creating a new editor page, the StackActions are created again and the WorkbenchPart field of this class is setted as the new subprocess editor. It's ok until here. By closing the subprocess editor and backing to the process editor, the re-created actions are not updated in the command stack (GFWorkspaceCommandStackImpl). Whatever changes I do on the process editor, Graphiti/GEF will try to get the commandstack from the already disposed workbenchPart of my subprocess. Throwing a NPE.
Now I'm in trouble 'cause I can't find a way to workaround this behavior.
Is this the correct behavior and I can not mix Undo/Redo with many editors? or...
Is this a real bug?
Thanks in advance
(Size: 7.74KB, Downloaded 80 times)
Powered by FUDForum
. Page generated in 0.02619 seconds