de.tu_berlin.cs.tfs.muvitorkit.commands
Class SetEObjectFeatureValueCommand
java.lang.Object
org.eclipse.gef.commands.Command
de.tu_berlin.cs.tfs.muvitorkit.commands.SetEObjectFeatureValueCommand
public class SetEObjectFeatureValueCommand
- extends Command
The SetEObjectFeatureValueCommand
is used for generically
changing an EObject
's value that is determined by a featureID. The
MuvitorKit's direct edit mechanism uses this class, but it may be freely used
to avoid repeated copy/paste of simple commands.
- Rating

Method Summary |
boolean |
canExecute()
This command can be executed if a feature of the edited element
corresponding to the featureID has been found. |
void |
execute()
|
void |
redo()
|
void |
undo()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SetEObjectFeatureValueCommand
public SetEObjectFeatureValueCommand(EObject editedElement,
String newValue,
int featureID)
- Create a
SetEObjectFeatureValueCommand
that changes the value of
an EObject
' feature.
- Parameters:
editedElement
- the element whose feature value should be changednewValue
- the new valuefeatureID
- the featureID of the feature to be changed, should be
retrieved from the EMF model's @link EPackage.
canExecute
public boolean canExecute()
- This command can be executed if a feature of the edited element
corresponding to the featureID has been found.
- Overrides:
canExecute
in class Command
execute
public void execute()
- Overrides:
execute
in class Command
undo
public void undo()
- Overrides:
undo
in class Command
redo
public void redo()
- Overrides:
redo
in class Command