UML

org.topcased.modeler.uml.sequencediagram.commands.creation
Class LifelineCreationCommand

java.lang.Object
  extended by CreateGraphNodeCommand
      extended by org.topcased.modeler.uml.sequencediagram.commands.creation.LifelineCreationCommand

public class LifelineCreationCommand
extends CreateGraphNodeCommand

Command to create a Lifeline


Constructor Summary
LifelineCreationCommand(org.eclipse.gef.EditDomain domain, GraphNode newObject, GraphNode newParent, EObject newContainerParent, org.eclipse.draw2d.geometry.Point location, org.eclipse.draw2d.geometry.Dimension dimension, int attach, java.util.List featuresList, boolean needModelUpdate)
          Constructor
 
Method Summary
protected  org.eclipse.uml2.uml.ConnectorEnd getConnectorEnd(org.eclipse.uml2.uml.Interaction interaction, org.eclipse.uml2.uml.Property prop)
          Return the connector end which has the correct property as role, owned by a connector int the interaction
protected  org.eclipse.uml2.uml.Property getProperty(org.eclipse.uml2.uml.Collaboration collaboration, org.eclipse.uml2.uml.Classifier c)
          Deprecated. use the getOwnedAttribute() method of the StructuredClassifier class defined in UML
protected  void redoModel()
          Create the Lifeline
protected  void undoModel()
          Remove the Lifeline
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LifelineCreationCommand

public LifelineCreationCommand(org.eclipse.gef.EditDomain domain,
                               GraphNode newObject,
                               GraphNode newParent,
                               EObject newContainerParent,
                               org.eclipse.draw2d.geometry.Point location,
                               org.eclipse.draw2d.geometry.Dimension dimension,
                               int attach,
                               java.util.List featuresList,
                               boolean needModelUpdate)
Constructor

Parameters:
domain - the EditDomain (used to init the name)
newObject - the node to create
newParent - the parentNode node
newContainerParent - the model object that should contain the new childNode object
location - the location of the created node
dimension - the size of the created node
attach - the newAttachment of the created node
featuresList - the avalaible model element feature of the parentNode node where the model element of the childNode node can be added
needModelUpdate - true if the model must be modified during this command, false if objects already exist in the mode.
Method Detail

redoModel

protected void redoModel()
Create the Lifeline

See Also:
org.topcased.modeler.commands.CreateGraphNodeCommand#redoModel()

getProperty

protected org.eclipse.uml2.uml.Property getProperty(org.eclipse.uml2.uml.Collaboration collaboration,
                                                    org.eclipse.uml2.uml.Classifier c)
Deprecated. use the getOwnedAttribute() method of the StructuredClassifier class defined in UML

Return the property own by the collaboration which is typed by the classifier. If the property is not found, create it.

Parameters:
collaboration - the owning collaboration
c - the wanted classifer
Returns:
the searched property

getConnectorEnd

protected org.eclipse.uml2.uml.ConnectorEnd getConnectorEnd(org.eclipse.uml2.uml.Interaction interaction,
                                                            org.eclipse.uml2.uml.Property prop)
Return the connector end which has the correct property as role, owned by a connector int the interaction

Parameters:
interaction - the owning interaction
prop - the property
Returns:
the ConnectorEnd

undoModel

protected void undoModel()
Remove the Lifeline

See Also:
org.topcased.modeler.commands.CreateGraphNodeCommand#undoModel()

UML

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.