vocleditor.commands
Class ReconnectAssociationRoleCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by vocleditor.commands.ReconnectAssociationRoleCommand

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

Connects two ClassifierRoles via an AssociationRole.


Constructor Summary
ReconnectAssociationRoleCommand(VOCLModel.AssociationRole associationrole, boolean isMovingSource)
          Constructor for the command class.
 
Method Summary
 boolean canExecute()
          True if the command could be executed, false otherwise.
 void execute()
          Entry point for command execution.
 VOCLModel.AssociationRole getAssociationRole()
           
 org.eclipse.swt.widgets.Shell getShell()
           
 VOCLModel.ClassifierRole getSource()
           
 VOCLModel.ClassifierRole getTarget()
           
 void redo()
          Redo command execution.
 void setAssociationRole(VOCLModel.AssociationRole newArc)
           
 void setEdPart(VOCLAssociationRoleEditPart edPart)
           
 void setIsMovingSource(boolean isMovingSource)
           
 void setShell(org.eclipse.swt.widgets.Shell shell)
           
 void setSource_old(VOCLModel.ClassifierRole oldSource)
           
 void setSource(VOCLModel.ClassifierRole newSource)
           
 void setTarget_old(VOCLModel.ClassifierRole oldTarget)
           
 void setTarget(VOCLModel.ClassifierRole newTarget)
           
 void undo()
          Undo command execution.
 
Methods inherited from class org.eclipse.gef.commands.Command
canUndo, chain, dispose, getDebugLabel, getLabel, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReconnectAssociationRoleCommand

public ReconnectAssociationRoleCommand(VOCLModel.AssociationRole associationrole,
                                       boolean isMovingSource)
Constructor for the command class.

Method Detail

canExecute

public boolean canExecute()
True if the command could be executed, false otherwise.

Overrides:
canExecute in class org.eclipse.gef.commands.Command

execute

public void execute()
Entry point for command execution.

Overrides:
execute in class org.eclipse.gef.commands.Command

getSource

public VOCLModel.ClassifierRole getSource()

getAssociationRole

public VOCLModel.AssociationRole getAssociationRole()

getTarget

public VOCLModel.ClassifierRole getTarget()

redo

public void redo()
Redo command execution.

Overrides:
redo in class org.eclipse.gef.commands.Command

getShell

public org.eclipse.swt.widgets.Shell getShell()
Returns:
Returns the shell.

setShell

public void setShell(org.eclipse.swt.widgets.Shell shell)
Parameters:
shell - The shell to set.

setSource

public void setSource(VOCLModel.ClassifierRole newSource)

setTarget

public void setTarget(VOCLModel.ClassifierRole newTarget)

setAssociationRole

public void setAssociationRole(VOCLModel.AssociationRole newArc)

setSource_old

public void setSource_old(VOCLModel.ClassifierRole oldSource)

setTarget_old

public void setTarget_old(VOCLModel.ClassifierRole oldTarget)

setIsMovingSource

public void setIsMovingSource(boolean isMovingSource)

setEdPart

public void setEdPart(VOCLAssociationRoleEditPart edPart)

undo

public void undo()
Undo command execution.

Overrides:
undo in class org.eclipse.gef.commands.Command