Ed Swartz Messages: 3 Registered: June 2012 Location: Austin, TX
In a default editor, as per bug 352109, the diagram type provider automatically issues update requests when the model changes.
This is a fine idea and looks good in practice, but it means the command stack is packed with a lot of Update commands! Is there a way to combine the Update commands with the original command that caused the domain model change, so the undo stack is clearer?
Michael Wenz Messages: 1795 Registered: July 2009 Location: Walldorf, Germany
combining these update commands with other manually triggered commands is
not possible now. But you might try and override the update commands
appearing in the undo stack by overriding the according update feature and
returning false on hasDoneChanges(). But, you need to make sure that none of
the masked changes is relevant for the real editor state and not just an
update that could automatically be applied. The editor graps its dirty state
from the undo stack, so users might not be able to save the editor with
their changes if you mask too much with hasDoneChanges() = false.