|
||||||||||
| 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.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 ConditionalRedoCommands. |
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 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 AbstractTransactionalCommandStackcommand - 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 back
protected void handleRollback(Command command,
RollbackException rbe)
handleRollback in class AbstractTransactionalCommandStackcommand - 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 CommandStackundo in class BasicCommandStackpublic boolean canRedo()
ConditionalRedoCommands.
canRedo in interface CommandStackcanRedo in class BasicCommandStackpublic void redo()
undo/redo options).
redo in interface CommandStackredo 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 triggers,
Map options)
throws InterruptedException,
RollbackException
InternalTransactionalCommandStackcommand; 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 Commands 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()
InternalTransactionalCommandStackediting 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 | |||||||||