SAM

org.topcased.modeler.sam.commands
Class CreateInstanceCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by org.topcased.modeler.sam.commands.CreateInstanceCommand

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

Represents the command used for a drag and drop of an existing system/automaton from the outline. The new system is empty and has its instanceOf reference set to the existing system. The corresponding graphnode is also created in this command.


Constructor Summary
CreateInstanceCommand(EObject newContainerParent, GraphNode newParentNode, GraphNode newNode, org.eclipse.draw2d.geometry.Point location)
           
 
Method Summary
 boolean canExecute()
           
 boolean canUndo()
           
 void execute()
           
 void redo()
           
 void undo()
           
 
Methods inherited from class org.eclipse.gef.commands.Command
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

CreateInstanceCommand

public CreateInstanceCommand(EObject newContainerParent,
                             GraphNode newParentNode,
                             GraphNode newNode,
                             org.eclipse.draw2d.geometry.Point location)
Method Detail

execute

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

canExecute

public boolean canExecute()
Overrides:
canExecute in class org.eclipse.gef.commands.Command

undo

public void undo()
Overrides:
undo in class org.eclipse.gef.commands.Command

canUndo

public boolean canUndo()
Overrides:
canUndo in class org.eclipse.gef.commands.Command

redo

public void redo()
Overrides:
redo in class org.eclipse.gef.commands.Command

SAM

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