Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Transaction.OPTION_NO_UNDO
Transaction.OPTION_NO_UNDO [message #620312] Wed, 17 September 2008 09:26
Andreas Scharf is currently offline Andreas ScharfFriend
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
Previous Topic:Unloading of resources in the TransactionalEditingDomain
Next Topic:Transaction.OPTION_NO_UNDO
Goto Forum:
  


Current Time: Wed Apr 24 18:22:11 GMT 2024

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

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

Back to the top