roneditor.ronview.commands
Class DeleteHLNodeCommand
java.lang.Object
org.eclipse.gef.commands.Command
roneditor.ronview.commands.DeleteHLNodeCommand
public class DeleteHLNodeCommand
- extends org.eclipse.gef.commands.Command
Command for removing a node from its parent RON. This is undoable.
Method Summary |
private void |
deleteArcs(ronmodel.HLNode hlNode)
Delete all arcs which are connected with the transition. |
void |
execute()
Executes the command by first hiding all views which display the element
that will be removed. |
void |
redo()
Redoes the command by removing the object from its container again. |
void |
undo()
Undoes the command by readding the previously removed object to its
former container that execute() has saved. |
Methods inherited from class org.eclipse.gef.commands.Command |
canExecute, canUndo, chain, dispose, getDebugLabel, getLabel, setDebugLabel, setLabel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeleteCommand_Label
private static final java.lang.String DeleteCommand_Label
- See Also:
- Constant Field Values
node
private final ronmodel.HLNode node
incomingHLArcs
private final java.util.Vector<org.eclipse.emf.ecore.EObject> incomingHLArcs
outgoingHLArcs
private final java.util.Vector<org.eclipse.emf.ecore.EObject> outgoingHLArcs
parent
private ronmodel.RON parent
DeleteHLNodeCommand
public DeleteHLNodeCommand(ronmodel.HLNode node)
deleteArcs
private void deleteArcs(ronmodel.HLNode hlNode)
- Delete all arcs which are connected with the transition.
- Parameters:
hlNode
-
execute
public void execute()
- Executes the command by first hiding all views which display the element
that will be removed. Then the child gets removed from its parent. The
container is stored for undoing purposes.
- Overrides:
execute
in class org.eclipse.gef.commands.Command
- See Also:
Command.execute()
undo
public void undo()
- Undoes the command by readding the previously removed object to its
former container that
execute()
has saved.
- Overrides:
undo
in class org.eclipse.gef.commands.Command
- See Also:
Command.undo()
redo
public void redo()
- Redoes the command by removing the object from its container again.
- Overrides:
redo
in class org.eclipse.gef.commands.Command