public interface ICommand
Modifier and Type | Method and Description |
---|---|
ICommand |
compose(ICommand command)
Composes this command with the specified command.
|
void |
execute(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Executes this command.
|
java.util.Collection |
getAffectedObjects()
Retrieves the collection of objects that would be affected if this
command were executed, undone, or redone.
|
CommandResult |
getCommandResult()
Retrieves the result of executing/undoing/redoing this command.
|
java.lang.String |
getLabel()
Retrieves the label for this command.
|
boolean |
isExecutable()
Retrieves a Boolean indicating whether this command can be executed.
|
boolean |
isRedoable()
Retrieves a Boolean indicating whether this command can be redone.
|
boolean |
isUndoable()
Retrieves a Boolean indicating whether this command can be undone.
|
void |
redo()
Redoes this command.
|
void |
undo()
Undoes this command.
|
java.lang.String getLabel()
CommandResult getCommandResult()
java.util.Collection getAffectedObjects()
ICommand compose(ICommand command)
command
- The command with which to compose this command.boolean isExecutable()
true
if the command can be executed;
false
otherwise.boolean isRedoable()
true
if the command can be redone;
false
otherwise.boolean isUndoable()
true
if the command can be undone;
false
otherwise.void execute(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
progressMonitor
- The object that monitors the progress of this command
execution. May be
NullProgressMonitor
if the
command should be executed without monitoring its progress.void redo()
void undo()