| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.common.command.AbstractCommand
org.eclipse.emf.edit.command.AbstractOverrideableCommand
This is a convenient base class for classes that implement OverrideableCommand. Subclasses of AbstractOverrideableCommand should provide implementations of the doXxx methods (e.g., doExecute) from OverrideableCommand instead of the base command methods (e.g., execute), which have final implementations here.
Nested Class Summary |
Nested classes inherited from class org.eclipse.emf.common.command.AbstractCommand |
AbstractCommand.NonDirtying |
Field Summary | |
protected EditingDomain | domain
This is the editing doman in which this command operates. |
protected Command | overrideCommand
This is the command that overrides this command. |
Fields inherited from class org.eclipse.emf.common.command.AbstractCommand |
description, isExecutable, isPrepared, label |
Constructor Summary | |
protected | AbstractOverrideableCommand(EditingDomain domain)
This constructs an instance in this editing domain. |
protected | AbstractOverrideableCommand(EditingDomain domain,
String label)
This constructs an instance with the given label and in this editing domain. |
protected | AbstractOverrideableCommand(EditingDomain domain,
String label,
String description)
This constructs an instance with the given label and description, in this editing domain. |
Method Summary | |
boolean | canExecute()
Returns whether the comamad is valid to execute. |
boolean | canUndo()
Returns whether the command can be undone. |
void | dispose()
Called to indicate that the command will never be used again. |
boolean | doCanExecute()
This is overrideable command's implementation of canExecute. |
boolean | doCanUndo()
This is overrideable command's implementation of canUndo. |
void | doDispose()
This is overrideable command's implementation of dispose. |
abstract void | doExecute()
This is overrideable command's implementation of execute. |
Collection | doGetAffectedObjects()
This is overrideable command's implementation of getAffectedObjects. |
Collection | doGetChildrenToCopy()
|
String | doGetDescription()
This is overrideable command's implementation of getDescription. |
String | doGetLabel()
This is overrideable command's implementation of getLabel. |
Collection | doGetResult()
This is overrideable command's implementation of getResult. |
abstract void | doRedo()
This is overrideable command's implementation of redo. |
abstract void | doUndo()
This is overrideable command's implementation of undo. |
void | execute()
Performs the command activity required for the effect. |
Collection | getAffectedObjects()
Returns the collection of things which this command wishes to present as the objects affected by the command. |
Collection | getChildrenToCopy()
|
String | getDescription()
Returns a string suitable to help describe the effect of this command. |
EditingDomain | getDomain()
This returns the editing domain that contains this. |
String | getLabel()
Returns a string suitable to represent the label that identifies this command. |
Command | getOverride()
This returns the command that overrides this command. |
static EList | getOwnerList(EObject owner,
EStructuralFeature feature)
|
Collection | getResult()
Returns a collection of things which this command wishes to present as it's result. |
void | redo()
Performs the command activity required to redo the effect after undoing the effect. |
void | setOverride(Command overrideCommand)
This sets the command that overrides this command. |
String | toString()
This gives an abbreviated name using this object's own class' name, without package qualification, followed by a space separated list of field:value pairs. |
void | undo()
Performs the command activity required to undo the effects of a preceding execute (or redo). |
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand |
chain, prepare, setDescription, setLabel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.emf.common.command.Command |
chain |
Field Detail |
protected EditingDomain domain
protected Command overrideCommand
Constructor Detail |
protected AbstractOverrideableCommand(EditingDomain domain)
protected AbstractOverrideableCommand(EditingDomain domain, String label)
protected AbstractOverrideableCommand(EditingDomain domain, String label, String description)
Method Detail |
public EditingDomain getDomain()
public Command getOverride()
public void setOverride(Command overrideCommand)
public final boolean canExecute()
public boolean doCanExecute()
public final void execute()
public abstract void doExecute()
public final boolean canUndo()
public boolean doCanUndo()
public final void undo()
public abstract void doUndo()
public final void redo()
public abstract void doRedo()
public final Collection getResult()
public Collection doGetResult()
public final Collection getAffectedObjects()
public Collection doGetAffectedObjects()
public final String getLabel()
public String doGetLabel()
public final String getDescription()
public String doGetDescription()
public final void dispose()
public void doDispose()
public final Collection getChildrenToCopy()
public Collection doGetChildrenToCopy()
public static EList getOwnerList(EObject owner, EStructuralFeature feature)
public String toString()
|
Copyright 2001-2004 IBM Corporation and others. All Rights Reserved. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |