UML

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

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by org.topcased.modeler.uml.sequencediagram.commands.creation.MessageAndExecutionCreationCommand

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

Command to create a Message and an ExecutionOccurrence


Constructor Summary
MessageAndExecutionCreationCommand(org.eclipse.gef.EditPartViewer viewer, org.eclipse.draw2d.geometry.Point loc, MessageEdgeCreationCommand messageCmd)
          Constructor
 
Method Summary
 boolean canExecute()
          Only if the execution can be created
 void execute()
          Execute the command to create the ExecutionSpecification and the Message
 void redo()
          Redo the command to create the ExecutionSpecification and the Message
protected  void setupMessageCommand()
          Set up the message command to target on the created Execution Occurrence
 void undo()
          Undo the both command
 
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

MessageAndExecutionCreationCommand

public MessageAndExecutionCreationCommand(org.eclipse.gef.EditPartViewer viewer,
                                          org.eclipse.draw2d.geometry.Point loc,
                                          MessageEdgeCreationCommand messageCmd)
Constructor

Parameters:
viewer - the viewer
loc - the location of the cursor
messageCmd - the command of creation of the message
Method Detail

setupMessageCommand

protected void setupMessageCommand()
Set up the message command to target on the created Execution Occurrence


canExecute

public boolean canExecute()
Only if the execution can be created

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

execute

public void execute()
Execute the command to create the ExecutionSpecification and the Message

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

redo

public void redo()
Redo the command to create the ExecutionSpecification and the Message

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

undo

public void undo()
Undo the both command

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

UML

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