|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.common.command.BasicCommandStack org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack org.eclipse.emf.transaction.impl.TransactionalCommandStackImpl
public class TransactionalCommandStackImpl
The default implementation of the transactional editing domain command stack.
Field Summary |
---|
Fields inherited from class org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack |
---|
exceptionHandler |
Fields inherited from class org.eclipse.emf.common.command.BasicCommandStack |
---|
commandList, listeners, mostRecentCommand, saveIndex, top |
Constructor Summary | |
---|---|
TransactionalCommandStackImpl()
Initializes me. |
Method Summary | |
---|---|
boolean |
canRedo()
Extends the inherited implementation to consider the redoability of ConditionalRedoCommand s. |
EMFCommandTransaction |
createTransaction(Command command,
Map<?,?> options)
Creates a read/write transaction in my editing domain for the purpose of executing the specified command. |
void |
dispose()
Disposes of my state and any additional resources that I may be retaining. |
protected void |
doExecute(Command command,
Map<?,?> options)
Implemented by subclasses to perform the execution of the specified command . |
void |
executeTriggers(Command command,
List<Command> triggers,
Map<?,?> options)
Executes the specified list of trigger commands. |
protected void |
handleRollback(Command command,
RollbackException rbe)
Extends the superclass implementation to first pop the failed command off of the stack, if it was already appended. |
void |
redo()
Extends the inherited implementation by invoking it within the context of a redo transaction (a read/write transaction with the undo/redo options ). |
void |
undo()
Extends the inherited implementation by invoking it within the context of an undo transaction (a read/write transaction with the undo/redo options ). |
Methods inherited from class org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack |
---|
basicExecute, execute, execute, getDomain, getExceptionHandler, getUndoRedoOptions, handleError, makeTriggerTransactionOptions, rollback, setEditingDomain, setExceptionHandler |
Methods inherited from class org.eclipse.emf.common.command.BasicCommandStack |
---|
addCommandStackListener, canUndo, flush, getMostRecentCommand, getRedoCommand, getUndoCommand, isSaveNeeded, notifyListeners, removeCommandStackListener, saveIsDone |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.emf.common.command.CommandStack |
---|
addCommandStackListener, canUndo, flush, getMostRecentCommand, getRedoCommand, getUndoCommand, removeCommandStackListener |
Constructor Detail |
---|
public TransactionalCommandStackImpl()
Method Detail |
---|
protected void doExecute(Command command, Map<?,?> options) throws InterruptedException, RollbackException
command
. Invoked by the AbstractTransactionalCommandStack.execute(Command, Map)
method.
doExecute
in class AbstractTransactionalCommandStack
command
- the command to executeoptions
- the transaction options to apply to execution of the command
InterruptedException
- if the current thread is interrupted while
waiting to start the transaction
RollbackException
- if the execution of the command is rolled backprotected void handleRollback(Command command, RollbackException rbe)
handleRollback
in class AbstractTransactionalCommandStack
command
- the command whose execution was rolled back (may be
null
if not known)rbe
- the roll-back exception (may be null
if no
exception is to be thrown)public void undo()
undo/redo options
).
undo
in interface CommandStack
undo
in class BasicCommandStack
public boolean canRedo()
ConditionalRedoCommand
s.
canRedo
in interface CommandStack
canRedo
in class BasicCommandStack
public void redo()
undo/redo options
).
redo
in interface CommandStack
redo
in class BasicCommandStack
public EMFCommandTransaction createTransaction(Command command, Map<?,?> options) throws InterruptedException
InternalTransactionalCommandStack
command
- a command that I need to executeoptions
- the options to apply to the resulting transaction
InterruptedException
- if the current thread is interrupted while
waiting for the transaction to startInternalTransactionalCommandStack.getDomain()
public void executeTriggers(Command command, List<Command> triggers, Map<?,?> options) throws InterruptedException, RollbackException
InternalTransactionalCommandStack
command
; they must not be "piggy-backed" on
the currently active transaction.
command
- the command whose execution triggered additional commands
(from pre-commit listeners)triggers
- a list of zero or more Command
s to execute.
If there are none, then no transaction needs to be startedoptions
- the options to apply to the child transaction
InterruptedException
- if the current thread is interrupted while
waiting for the trigger transaction to start
RollbackException
- if the trigger transaction rolls back on commitResourceSetListener.transactionAboutToCommit(org.eclipse.emf.transaction.ResourceSetChangeEvent)
,
InternalTransactionalCommandStack.createTransaction(Command, Map)
public void dispose()
InternalTransactionalCommandStack
editing domain
is disposed.
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |