Transaction.OPTION_NO_UNDO [message #620312] |
Wed, 17 September 2008 09:26 |
Andreas Scharf Messages: 20 Registered: September 2010 |
Junior Member |
|
|
Hi,
I wrote an action whic the user can call within a view (not an editor).
The action modifies some resources (i.e. it deletes objects) and then
I've to save the resources that were affected automatically. I don't
want the user to undo these changes in any opened editor, so I did this:
editingDomain.getCommandStack().execute(
DeleteCommand.create(editingDomain, preparedSelection),
Collections.singletonMap(Transaction.OPTION_NO_UNDO, Boolean.TRUE));
The problem is, that my editor still get's dirty and enables the undo
action. That's fatal because the user then presses undo, the editor
isn't dirty anymore but the resource doesn't get saved (since save was
not included in the deleteCommand of course).
Do I have to manually react in my editor on this transaction flag which
I've set above and don't let the editor get dirty? I thought that would
automatically handled by not notifiying any IOperationHistoryListeners.
I should mention that I'm using the WorkspaceCommandStack.
Regards,
Andreas
|
|
|
Powered by
FUDForum. Page generated in 0.03341 seconds