|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gef.commands.Command
org.eclipse.gmt.umlx.editor.command.AbstractCommand
org.eclipse.gmt.umlx.editor.command.CompoundCommand
public class CompoundCommand
An aggregation of multiple Commands
. A CompoundCommand
is
executable if all of its contained Commands are executable, and it has at least one
contained Command. The same is true for undo. When undo is called, the contained
Commands are undone in the reverse order in which they were executed.
An empty CompoundCommand is not executable.
Method Summary | |
---|---|
void |
add(IAbstractCommand command)
Adds the specified command if it is not null . |
void |
addSelectedObjects(java.util.Collection<java.lang.Object> selectedObjects,
boolean isDone)
|
boolean |
canExecute()
|
boolean |
canUndo()
|
static IAbstractCommand |
compound(java.lang.String label,
IAbstractCommand baseCommand,
IAbstractCommand extraCommand)
Return a possibly compound command that comprises the base possibly compound command followed by the extra command. |
void |
diagnoseCannotExecute(boolean isUndo)
|
void |
dispose()
|
void |
doPrepare(IAbstractCommand rootCommand)
Prepare to execute the command. |
void |
doRedo()
(re)-execute the command. |
void |
doUndo()
un-execute the command. |
java.util.List<IAbstractCommand> |
getCommands()
|
java.lang.String |
getLabel()
|
java.lang.String |
toString()
|
Methods inherited from class org.eclipse.gmt.umlx.editor.command.AbstractCommand |
---|
couldNotUnlock, execute, getCommand, prepare, prepare, redo, requestModification, undo |
Methods inherited from class org.eclipse.gef.commands.Command |
---|
chain, getDebugLabel, setDebugLabel, setLabel |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static IAbstractCommand compound(java.lang.String label, IAbstractCommand baseCommand, IAbstractCommand extraCommand)
label
- for any constructed CompoundCommandbaseCommand
- extraCommand
-
public void add(IAbstractCommand command)
null
.
command
- null
or a Commandpublic void addSelectedObjects(java.util.Collection<java.lang.Object> selectedObjects, boolean isDone)
addSelectedObjects
in interface IAbstractCommand
addSelectedObjects
in class AbstractCommand
public boolean canExecute()
canExecute
in interface IAbstractCommand
canExecute
in class AbstractCommand
public boolean canUndo()
canUndo
in interface IAbstractCommand
canUndo
in class AbstractCommand
public void diagnoseCannotExecute(boolean isUndo) throws AbstractFailureException
diagnoseCannotExecute
in interface IAbstractCommand
diagnoseCannotExecute
in class AbstractCommand
AbstractFailureException
public void dispose()
dispose
in interface IAbstractCommand
dispose
in class AbstractCommand
public void doPrepare(IAbstractCommand rootCommand)
AbstractCommand
rootCommand
- command gathering mofication permissions etcpublic void doRedo()
AbstractCommand
public void doUndo()
AbstractCommand
public java.util.List<IAbstractCommand> getCommands()
public java.lang.String getLabel()
getLabel
in interface IAbstractCommand
getLabel
in class org.eclipse.gef.commands.Command
public java.lang.String toString()
toString
in class AbstractCommand
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |