public class WorkspaceCommandStackImpl
extends org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack
implements org.eclipse.emf.workspace.IWorkspaceCommandStack
IOperationHistory.
This is the command stack implementation used by editing domains created by the WorkspaceEditingDomainFactory.
| Constructor and Description |
|---|
WorkspaceCommandStackImpl(IOperationHistory history)
Initializes me with the operation history to which I delegate command execution.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRedo()
Queries whether we can redo my default undo context in my operation history.
|
boolean |
canUndo()
Queries whether we can undo my default undo context in my operation history.
|
org.eclipse.emf.transaction.impl.EMFCommandTransaction |
createTransaction(org.eclipse.emf.common.command.Command command,
java.util.Map options) |
void |
dispose() |
void |
executeTriggers(org.eclipse.emf.common.command.Command command,
java.util.List triggers,
java.util.Map options) |
void |
flush()
Disposes my default undo context in my operation history.
|
IUndoContext |
getDefaultUndoContext() |
org.eclipse.emf.common.command.Command |
getMostRecentCommand()
Gets the command from the most recently executed, done, or redone operation.
|
IOperationHistory |
getOperationHistory() |
org.eclipse.emf.common.command.Command |
getRedoCommand()
Gets the command from the top of the redo history, if any.
|
org.eclipse.emf.common.command.Command |
getUndoCommand()
Gets the command from the top of the undo history, if any.
|
boolean |
isSaveNeeded() |
void |
redo()
Redoes my default undo context in my operation history.
|
void |
saveIsDone() |
void |
setEditingDomain(org.eclipse.emf.transaction.impl.InternalTransactionalEditingDomain domain)
Extends the superclass implementation to add/remove listeners on the editing domain.
|
void |
undo()
Undoes my default undo context in my operation history.
|
execute, execute, getDomain, getExceptionHandler, makeTriggerTransactionOptions, setExceptionHandleraddCommandStackListener, removeCommandStackListenerequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic WorkspaceCommandStackImpl(IOperationHistory history)
history - my operation historypublic void setEditingDomain(org.eclipse.emf.transaction.impl.InternalTransactionalEditingDomain domain)
setEditingDomain in interface org.eclipse.emf.transaction.impl.InternalTransactionalCommandStacksetEditingDomain in class org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStackpublic final IOperationHistory getOperationHistory()
getOperationHistory in interface org.eclipse.emf.workspace.IWorkspaceCommandStackpublic final IUndoContext getDefaultUndoContext()
getDefaultUndoContext in interface org.eclipse.emf.workspace.IWorkspaceCommandStackpublic boolean canUndo()
canUndo in interface org.eclipse.emf.common.command.CommandStackcanUndo in class org.eclipse.emf.common.command.BasicCommandStackpublic void undo()
undo in interface org.eclipse.emf.common.command.CommandStackundo in class org.eclipse.emf.common.command.BasicCommandStackpublic boolean canRedo()
canRedo in interface org.eclipse.emf.common.command.CommandStackcanRedo in class org.eclipse.emf.common.command.BasicCommandStackpublic void redo()
redo in interface org.eclipse.emf.common.command.CommandStackredo in class org.eclipse.emf.common.command.BasicCommandStackpublic void flush()
flush in interface org.eclipse.emf.common.command.CommandStackflush in class org.eclipse.emf.common.command.BasicCommandStackpublic org.eclipse.emf.common.command.Command getMostRecentCommand()
getMostRecentCommand in interface org.eclipse.emf.common.command.CommandStackgetMostRecentCommand in class org.eclipse.emf.common.command.BasicCommandStackpublic org.eclipse.emf.common.command.Command getUndoCommand()
getUndoCommand in interface org.eclipse.emf.common.command.CommandStackgetUndoCommand in class org.eclipse.emf.common.command.BasicCommandStackpublic org.eclipse.emf.common.command.Command getRedoCommand()
getRedoCommand in interface org.eclipse.emf.common.command.CommandStackgetRedoCommand in class org.eclipse.emf.common.command.BasicCommandStackpublic org.eclipse.emf.transaction.impl.EMFCommandTransaction createTransaction(org.eclipse.emf.common.command.Command command,
java.util.Map options)
throws java.lang.InterruptedException
createTransaction in interface org.eclipse.emf.transaction.impl.InternalTransactionalCommandStackjava.lang.InterruptedExceptionpublic void executeTriggers(org.eclipse.emf.common.command.Command command,
java.util.List triggers,
java.util.Map options)
throws java.lang.InterruptedException,
org.eclipse.emf.transaction.RollbackException
executeTriggers in interface org.eclipse.emf.transaction.impl.InternalTransactionalCommandStackjava.lang.InterruptedExceptionorg.eclipse.emf.transaction.RollbackExceptionpublic void dispose()
dispose in interface org.eclipse.emf.transaction.impl.InternalTransactionalCommandStackpublic boolean isSaveNeeded()
isSaveNeeded in class org.eclipse.emf.common.command.BasicCommandStackpublic void saveIsDone()
saveIsDone in class org.eclipse.emf.common.command.BasicCommandStack