UML

org.topcased.modeler.uml.sequencediagram.commands.update
Class UpdateLifelineRepresentsCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by org.topcased.modeler.uml.sequencediagram.commands.update.UpdateLifelineRepresentsCommand

public class UpdateLifelineRepresentsCommand
extends org.eclipse.gef.commands.Command

Command for updating the represents property associated with a Lifeline Creation 13 juin 06


Constructor Summary
UpdateLifelineRepresentsCommand(org.eclipse.uml2.uml.Lifeline lifeline, org.eclipse.uml2.uml.Classifier classifier, org.eclipse.gef.EditDomain domain)
          Create a command for updating InstanceSpecification values
 
Method Summary
 void execute()
          Store the old Property associated with the represents property of the Lifeline and then make the redo
protected  org.eclipse.uml2.uml.ConnectorEnd getConnectorEnd(org.eclipse.uml2.uml.Interaction interaction, org.eclipse.uml2.uml.ConnectableElement prop)
          Return the connector end which has the correct property as role, owned by a connector in the interaction
 void redo()
          Update the lifeline parameters
 void undo()
          Undo the update
 
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
 

Constructor Detail

UpdateLifelineRepresentsCommand

public UpdateLifelineRepresentsCommand(org.eclipse.uml2.uml.Lifeline lifeline,
                                       org.eclipse.uml2.uml.Classifier classifier,
                                       org.eclipse.gef.EditDomain domain)
Create a command for updating InstanceSpecification values

Parameters:
lifeline - the current lifeline object
classifier - the new classifier that represents the lifeline
domain - the edit domain
Method Detail

getConnectorEnd

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

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

execute

public void execute()
Store the old Property associated with the represents property of the Lifeline and then make the redo

Overrides:
execute in class org.eclipse.gef.commands.Command
See Also:
Command.execute()

redo

public void redo()
Update the lifeline parameters

Overrides:
redo in class org.eclipse.gef.commands.Command
See Also:
Command.redo()

undo

public void undo()
Undo the update

Overrides:
undo in class org.eclipse.gef.commands.Command
See Also:
Command.undo()

UML

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