|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.common.command.BasicCommandStack
org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl
Implementation of a transactional command stack that delegates
execution of commands to an IOperationHistory
.
This is the command stack implementation used by editing domains created by
the WorkspaceEditingDomainFactory
.
Field Summary |
Fields inherited from class org.eclipse.emf.common.command.BasicCommandStack |
commandList, listeners, mostRecentCommand, saveIndex, top |
Constructor Summary | |
WorkspaceCommandStackImpl(org.eclipse.core.commands.operations.IOperationHistory history)
Initializes me with the operation history to which I delegate command execution. |
Method Summary | |
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. |
EMFCommandTransaction |
createTransaction(org.eclipse.emf.common.command.Command command,
Map options)
|
void |
dispose()
|
void |
execute(org.eclipse.emf.common.command.Command command)
|
void |
execute(org.eclipse.emf.common.command.Command command,
Map options)
|
void |
executeTriggers(org.eclipse.emf.common.command.Command command,
List triggers,
Map options)
|
void |
flush()
Disposes my default undo context in my operation history. |
org.eclipse.core.commands.operations.IUndoContext |
getDefaultUndoContext()
Obtains the default undo context to add to the undoable operations that I execute on my operation history to wrap Command s. |
InternalTransactionalEditingDomain |
getDomain()
|
ExceptionHandler |
getExceptionHandler()
|
org.eclipse.emf.common.command.Command |
getMostRecentCommand()
Gets the command from the most recently executed, done, or redone operation. |
org.eclipse.core.commands.operations.IOperationHistory |
getOperationHistory()
Obtains the operation history to which I delegate command execution. |
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. |
protected void |
handleError(Exception exception)
Extends the inherited method by first passing the exception along to the registered exception handler (if any). |
boolean |
isSaveNeeded()
|
void |
redo()
Redoes my default undo context in my operation history. |
void |
saveIsDone()
|
void |
setEditingDomain(InternalTransactionalEditingDomain domain)
|
void |
setExceptionHandler(ExceptionHandler handler)
|
void |
undo()
Undoes my default undo context in my operation history. |
Methods inherited from class org.eclipse.emf.common.command.BasicCommandStack |
addCommandStackListener, notifyListeners, removeCommandStackListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WorkspaceCommandStackImpl(org.eclipse.core.commands.operations.IOperationHistory history)
history
- my operation historyMethod Detail |
public InternalTransactionalEditingDomain getDomain()
public void setEditingDomain(InternalTransactionalEditingDomain domain)
public final org.eclipse.core.commands.operations.IOperationHistory getOperationHistory()
IWorkspaceCommandStack
getOperationHistory
in interface IWorkspaceCommandStack
public final org.eclipse.core.commands.operations.IUndoContext getDefaultUndoContext()
IWorkspaceCommandStack
Command
s. Moreover,
undo, redo, and flush are context-specific operations
in the operation history, so my undo/redo/flush commands use this context
in delegating to the history. Likewise, the determination of the
most recent command and undo/redo commands depends on this context.
getDefaultUndoContext
in interface IWorkspaceCommandStack
TransactionalCommandStack#execute(Command, java.util.Map)
,
CommandStack.undo()
,
CommandStack.redo()
,
CommandStack.flush()
,
CommandStack.getMostRecentCommand()
,
CommandStack.getUndoCommand()
,
CommandStack.getRedoCommand()
public void execute(org.eclipse.emf.common.command.Command command, Map options) throws InterruptedException, RollbackException
InterruptedException
RollbackException
public void execute(org.eclipse.emf.common.command.Command command)
execute
in interface org.eclipse.emf.common.command.CommandStack
public void setExceptionHandler(ExceptionHandler handler)
public ExceptionHandler getExceptionHandler()
protected void handleError(Exception exception)
public boolean canUndo()
canUndo
in interface org.eclipse.emf.common.command.CommandStack
public void undo()
undo
in interface org.eclipse.emf.common.command.CommandStack
public boolean canRedo()
canRedo
in interface org.eclipse.emf.common.command.CommandStack
public void redo()
redo
in interface org.eclipse.emf.common.command.CommandStack
public void flush()
flush
in interface org.eclipse.emf.common.command.CommandStack
public org.eclipse.emf.common.command.Command getMostRecentCommand()
getMostRecentCommand
in interface org.eclipse.emf.common.command.CommandStack
public org.eclipse.emf.common.command.Command getUndoCommand()
getUndoCommand
in interface org.eclipse.emf.common.command.CommandStack
public org.eclipse.emf.common.command.Command getRedoCommand()
getRedoCommand
in interface org.eclipse.emf.common.command.CommandStack
public EMFCommandTransaction createTransaction(org.eclipse.emf.common.command.Command command, Map options) throws InterruptedException
InterruptedException
public void executeTriggers(org.eclipse.emf.common.command.Command command, List triggers, Map options) throws InterruptedException, RollbackException
InterruptedException
RollbackException
public void dispose()
public boolean isSaveNeeded()
public void saveIsDone()
|
Copyright 2002, 2006 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |