1

After opening an Eclipse Graphiti editor I want to do some initialization changes on the diagram. Doing that, using transactions, the editor turns dirty.
I didn't find a way to reset the dirty state, I don't want to save the diagram at this point.

BasicCommandStack commandStack = (BasicCommandStack) getEditingDomain().getCommandStack();
commandStack.execute(new RecordingCommand(getEditingDomain()) {
    @Override
    protected void doExecute() {
        // do some change
    }
});

If I use flush() on the command stack, my init changes are undone as well:

BasicCommandStack commandStack = (BasicCommandStack) getEditingDomain().getCommandStack();
commandStack.flush();

Is there a way to reset the dirty state?
Maybe there is a way to disable transaction handling or command stack recording?

flavio.donze
  • 7,432
  • 9
  • 58
  • 91

0 Answers0