Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Undo in a MultiPageEditor environment
Undo in a MultiPageEditor environment [message #1017921] Tue, 12 March 2013 19:59 Go to next message
Vitor Enio is currently offline Vitor EnioFriend
Messages: 4
Registered: June 2012
Junior Member
Hi,

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
  • Attachment: NPE.txt
    (Size: 7.74KB, Downloaded 358 times)
Re: Undo in a MultiPageEditor environment [message #1018995 is a reply to message #1017921] Thu, 14 March 2013 21:33 Go to previous messageGo to next message
Vitor Enio is currently offline Vitor EnioFriend
Messages: 4
Registered: June 2012
Junior Member
Well, I would like to simplify my question:

Is possible to implement an Undo/Redo behavior on a MuiltiPage environment?

Where can I find some examples?

Thank you!

[Updated on: Thu, 14 March 2013 21:33]

Report message to a moderator

Re: Undo in a MultiPageEditor environment [message #1020613 is a reply to message #1017921] Mon, 18 March 2013 15:08 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Vitor,

hm, I'm not sure but this could be a real issue. Would you please file a
bugzilla to track this?

The background could be that reusing editors is currently not possible and
would be kind of hard to achieve...

Thanks,
Michael
Re: Undo in a MultiPageEditor environment [message #1021275 is a reply to message #1020613] Tue, 19 March 2013 19:30 Go to previous message
Vitor Enio is currently offline Vitor EnioFriend
Messages: 4
Registered: June 2012
Junior Member
Thank you,

new bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=403837

MfG
Vitor.
Previous Topic:DoubleClickFeature on diagram
Next Topic:Solved: Package with uri 'http://xyz.de/1.0' not found
Goto Forum:
  


Current Time: Thu Apr 25 04:47:01 GMT 2024

Powered by FUDForum. Page generated in 0.03113 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top