[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmf] Re: IUndoContext and Undo/Redo actions
|
Hello Javier,
But then I find a problem with working with the
TransactionalEditingDomain.commandStack(). If I have an EMF command,
This will be an instance of org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.createHistoryListener().
and I execute it this way:
editingDomain().getCommandStack().execute(command) I don't really know
which context it is operating under, since that CommandStack has no
UndoContext and EMF command have no UndoContext either. But when you
See WorkspaceCommandStackImpl.DomainListener + org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor.
These two listeners will finally attach necessary undo context to each EMF
operation executed via EMF command stack, so each operation executed via
GMF/EMF command stack or just an AbstractEMFOperation executed on Operation
History finally will be associated with EditingDomainUndoContext (an instance
returned from DiagramEditor.getUndoContext()).
How is this possible? Which undo context have those commands executed
in the TransactionalEditingDomain? I need to understand this because
EditingDomainUndoContext (==DiagramEditor.getUndoContext())
-----------------
Alex Shatalin