de.cau.cs.kieler.core.model.util
Class SetIndexCommand<T extends EObject>
java.lang.Object
org.eclipse.emf.common.command.AbstractCommand
de.cau.cs.kieler.core.model.util.SetIndexCommand<T>
- Type Parameters:
T
- Type to sort.
- All Implemented Interfaces:
- Command
public class SetIndexCommand<T extends EObject>
- extends AbstractCommand
Set an integer feature of the element to its index in a list.
- Rating

Methods inherited from class org.eclipse.emf.common.command.AbstractCommand |
canExecute, canUndo, chain, dispose, getAffectedObjects, getDescription, getLabel, getResult, setDescription, setLabel, toString |
SetIndexCommand
public SetIndexCommand(EList<T> theList,
EStructuralFeature theFeature,
int theOffset)
- Parameters:
theList
- the List to sorttheFeature
- the feature to set the index totheOffset
- an offset to add to the index
execute
public void execute()
-
redo
public void redo()
-
undo
public void undo()
- Specified by:
undo
in interface Command
- Overrides:
undo
in class AbstractCommand
getList
protected EList<T> getList()
- Get the list.
- Returns:
- list.
prepare
protected boolean prepare()
- Overrides:
prepare
in class AbstractCommand