|
|||||||||
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
public abstract class AbstractCommand
This AbstractCommand adds the concepts of a preparation phase resulting in prefix commands, modified resources and unmodifiable objects. The preparation phase must be performed exactly once before either canExecute() or execute() can successfully occur. The preparation may result in the determination of nested commands that must be executed before this command (or undone after). The preparation should result in a requestModication invocation of every object that might be modified. This enables permission for the command to be determined and diagnosed, and the affected resources to be marked modified, or unmodified after an undo.
Constructor Summary | |
---|---|
AbstractCommand(java.lang.String label)
|
Method Summary | ||
---|---|---|
void |
addSelectedObjects(java.util.Collection<java.lang.Object> selectedObjects,
boolean isDone)
|
|
boolean |
canExecute()
|
|
boolean |
canUndo()
|
|
org.eclipse.emf.ecore.resource.Resource |
couldNotUnlock()
Unlock all resources to facilitate sucvcessgful command execution. |
|
void |
diagnoseCannotExecute(boolean isUndo)
|
|
void |
dispose()
|
|
void |
execute()
|
|
org.eclipse.gef.commands.Command |
getCommand()
|
|
void |
prepare()
Prepare the command for execution. |
|
void |
prepare(IAbstractCommand rootCommand)
Prepare the command for execution. |
|
void |
redo()
(re)-execute the command and its prefix chain. |
|
|
requestModification(T object)
Request modification of object by the derived command. |
|
java.lang.String |
toString()
|
|
void |
undo()
un-execute the command and its prefix chain. |
Methods inherited from class org.eclipse.gef.commands.Command |
---|
chain, getDebugLabel, getLabel, setDebugLabel, setLabel |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.gmt.umlx.editor.command.IAbstractCommand |
---|
getLabel |
Constructor Detail |
---|
public AbstractCommand(java.lang.String label)
Method Detail |
---|
public void addSelectedObjects(java.util.Collection<java.lang.Object> selectedObjects, boolean isDone)
addSelectedObjects
in interface IAbstractCommand
public boolean canExecute()
canExecute
in interface IAbstractCommand
canExecute
in class org.eclipse.gef.commands.Command
public boolean canUndo()
canUndo
in interface IAbstractCommand
canUndo
in class org.eclipse.gef.commands.Command
public org.eclipse.emf.ecore.resource.Resource couldNotUnlock()
couldNotUnlock
in interface IAbstractCommand
public void diagnoseCannotExecute(boolean isUndo) throws AbstractFailureException
diagnoseCannotExecute
in interface IAbstractCommand
AbstractFailureException
public void dispose()
dispose
in interface IAbstractCommand
dispose
in class org.eclipse.gef.commands.Command
public final void execute()
execute
in interface IAbstractCommand
execute
in class org.eclipse.gef.commands.Command
public org.eclipse.gef.commands.Command getCommand()
getCommand
in interface IAbstractCommand
public final void prepare()
prepare
in interface IAbstractCommand
public final void prepare(IAbstractCommand rootCommand)
prepare
in interface IAbstractCommand
public final void redo()
redo
in interface IAbstractCommand
redo
in class org.eclipse.gef.commands.Command
public <T> boolean requestModification(T object)
requestModification
in interface IAbstractCommand
object
-
public java.lang.String toString()
toString
in class java.lang.Object
public final void undo()
undo
in interface IAbstractCommand
undo
in class org.eclipse.gef.commands.Command
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |