|
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.ReconnectEdgeToNodeCommand
public abstract class ReconnectEdgeToNodeCommand
This commands sets a reference of a node to the given edge
| Constructor Summary | |
|---|---|
ReconnectEdgeToNodeCommand(org.eclipse.gef.ConnectionEditPart connection,
java.lang.String featureName)
|
|
ReconnectEdgeToNodeCommand(org.eclipse.gef.EditDomain domain,
org.eclipse.gef.ConnectionEditPart connection,
java.lang.String featureName,
boolean needModelUpdate)
|
|
| Method Summary | |
|---|---|
protected void |
doContainer(EObject owner,
EObject toUpdate)
Sets the object to update within the same container as the owner |
protected abstract EObject |
getObjectToUpdate()
Returns the model object to be updated by changements |
protected void |
redoModel()
Update the model after at the end of the redo() method. |
void |
setContainerRef(java.lang.String reference,
int commandType)
Keeps a trace of the container's feature |
protected void |
undoContainer(EObject updated)
Sets back the old conatiner to the given object |
protected void |
undoModel()
Update the model at the end of the undo() method. |
| Methods inherited from class org.topcased.modeler.commands.ReconnectGraphEdgeCommand |
|---|
canExecute, execute, getEdge, getNewElement, getOldElement, getOldGraphElement, initializeConnectors, redo, setNewElement, undo, 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 |
| Constructor Detail |
|---|
public ReconnectEdgeToNodeCommand(org.eclipse.gef.ConnectionEditPart connection,
java.lang.String featureName)
domain - connection -
public ReconnectEdgeToNodeCommand(org.eclipse.gef.EditDomain domain,
org.eclipse.gef.ConnectionEditPart connection,
java.lang.String featureName,
boolean needModelUpdate)
domain - connection - needModelUpdate - | Method Detail |
|---|
protected void redoModel()
ReconnectGraphEdgeCommand
redoModel in class ReconnectGraphEdgeCommandReconnectGraphEdgeCommand.redoModel()protected void undoModel()
ReconnectGraphEdgeCommand
undoModel in class ReconnectGraphEdgeCommandReconnectGraphEdgeCommand.undoModel()
public void setContainerRef(java.lang.String reference,
int commandType)
reference - The containers feature namecommandType - the type of containmentSourceTargetData.NONE,
SourceTargetData.DIAGRAM,
SourceTargetData.SOURCE,
SourceTargetData.SOURCE_CONTAINER,
SourceTargetData.TARGET,
SourceTargetData.TARGET_CONTAINER
protected void doContainer(EObject owner,
EObject toUpdate)
owner - The owner which has a reference to the object to updatetoUpdate - The object sharing the same container as the ownerprotected void undoContainer(EObject updated)
updated - The object to be placed inside its ancient containerprotected 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.