|
Modelers | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gef.commands.Command
org.topcased.modeler.commands.ReconnectGraphEdgeCommand
org.topcased.modeler.commands.ReconnectNodeToNodeCommand
public abstract class ReconnectNodeToNodeCommand
This abstract command may be used when the edge is not contained by
any EObject
. It means the edge virtually represents a reference
from one node to another.
Field Summary | |
---|---|
static int |
SOURCE
This means the user is reconnecting the SOURCE. |
static int |
TARGET
This means the user is reconnecting the TARGET. |
Constructor Summary | |
---|---|
ReconnectNodeToNodeCommand(org.eclipse.gef.ConnectionEditPart connection,
java.lang.String featureName,
int reconnectedEnd)
Constructor. |
Method Summary | |
---|---|
protected void |
doDirectReference(EObject node,
EObject newReference,
EObject oldReference)
Sets the new reference to the given node. |
protected void |
doInverseReference(EObject reference,
EObject newNode,
EObject oldNode)
Adds the reference to the new node. |
protected EObject |
getFixedEnd()
Retuns the model object corresponding to the fixed edge end |
protected abstract EObject |
getObjectToUpdate()
Retuns the model object corresponding to the fixed edge end |
protected GraphElement |
getOldGraphElement(org.eclipse.gef.ConnectionEditPart connection)
|
protected int |
getReconnectionEndType()
Returns the type of reconnection |
protected void |
undoDirectReference(EObject valueToUnset,
EObject newNode,
EObject oldNode)
Undo what was done before by the doDirectReference() method |
protected void |
undoInverseReference(EObject valueToUnset,
EObject newNode,
EObject oldNode)
Undo what was done before by the doInverseReference() method. |
Methods inherited from class org.topcased.modeler.commands.ReconnectGraphEdgeCommand |
---|
canExecute, execute, getEdge, getNewElement, getOldElement, initializeConnectors, redo, redoModel, setNewElement, undo, undoModel, updateConnectors |
Methods inherited from class org.eclipse.gef.commands.Command |
---|
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 |
Field Detail |
---|
public static int SOURCE
public static int TARGET
Constructor Detail |
---|
public ReconnectNodeToNodeCommand(org.eclipse.gef.ConnectionEditPart connection, java.lang.String featureName, int reconnectedEnd)
SOURCE
to
reconnect the source and TARGET
to reconnect the target. Another value
(a value higher than 1) will make the command to be ignored
domain
- connection
- featureName
- reconnectedEnd
- Method Detail |
---|
protected GraphElement getOldGraphElement(org.eclipse.gef.ConnectionEditPart connection)
getOldGraphElement
in class ReconnectGraphEdgeCommand
ReconnectGraphEdgeCommand.getOldGraphElement(org.eclipse.gef.ConnectionEditPart)
protected void doDirectReference(EObject node, EObject newReference, EObject oldReference)
node
- The node which sets the new referencenewReference
- The new object to referenceoldReference
- The old object referenced. It will be take the place of
the newReference in the container.protected void undoDirectReference(EObject valueToUnset, EObject newNode, EObject oldNode)
valueToUnset
- The value to set its old features.newNode
- the new source which contained the value to unsetoldNode
- the old source to restablish its valuedoDirectReference(EObject, EObject, EObject)
protected void doInverseReference(EObject reference, EObject newNode, EObject oldNode)
reference
- The value to be referenced by the new nodenewNode
- The node object which is going to reference the valueoldNode
- The node that will not reference the given value any longerprotected void undoInverseReference(EObject valueToUnset, EObject newNode, EObject oldNode)
valueToUnset
- The value to set its old features.newNode
- the new source which contained the value to unsetoldNode
- the old source to restablish its valuedoInverseReference(EObject, EObject, EObject)
protected int getReconnectionEndType()
SOURCE
,
TARGET
protected EObject getFixedEnd()
protected abstract EObject getObjectToUpdate()
|
Modelers | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.