| Saving vs Undo [message #832945] |
Fri, 30 March 2012 15:26  |
Hernan Gonzalez Messages: 146 Registered: October 2010 Location: Buenos Aires, Argentina |
Senior Member |
|
|
Currently (0.9.0, I think) the Editor flushes the command stack when doing a save. This means that after saving the diagram we loose the ability to undo (i.e. to revert to some state before the saving). This is hardly acceptable in most scenarios (I cannot recall any modern editor -text, image, whatever- that does that).
A comment in EmfService.save() says
// For the time being, we clear the command stack after saving.
// In a later sprint we might try to implement undo/redo
// across save calls (not that easy to handle the ResourceImpl.isModified flag, which is also
// set by save() outside any command).
Anyone has any experience or any tips about this issue?
[Updated on: Fri, 30 March 2012 15:28] Report message to a moderator
|
|
|
| Re: Saving vs Undo [message #834744 is a reply to message #832945] |
Mon, 02 April 2012 06:41  |
Michael Wenz Messages: 1270 Registered: July 2009 Location: Walldorf, Germany |
Senior Member |
|
|
This is in for some hinstorical reasons I can unfortunatly no longer
remember. In our MOF-based version we had a command stack that was capable
of undo/redo across save operations. When we migrated to EMF the coding
snippet you found dropped in. Not sure what would be the consequences of
taking this out...
There's an open Bugzilla for this as well:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=372753
Michael
|
|
|
Powered by
FUDForum. Page generated in 0.01871 seconds