vocleditor.commands
Class EditContextCommand

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

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

Command class for edit the context properties.

Author:
manaljav, bjoern

Constructor Summary
EditContextCommand(VOCLModel.Context context)
          The constructor.
 
Method Summary
 void execute()
          Executes the command.
 void redo()
          Redo command execution.
 void setCommandAttributes(java.lang.String constraintName, java.lang.String type, boolean isClassifier, VOCLModel.ClassifierRole classifier, VOCLModel.Method method)
          Sets the command attributes.
 void undo()
          Undo command execution.
 
Methods inherited from class org.eclipse.gef.commands.Command
canExecute, 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

EditContextCommand

public EditContextCommand(VOCLModel.Context context)
The constructor.

Method Detail

execute

public void execute()
Executes the command.

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

undo

public void undo()
Undo command execution.

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

redo

public void redo()
Redo command execution.

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

setCommandAttributes

public void setCommandAttributes(java.lang.String constraintName,
                                 java.lang.String type,
                                 boolean isClassifier,
                                 VOCLModel.ClassifierRole classifier,
                                 VOCLModel.Method method)
Sets the command attributes.

Parameters:
constraintName - the new name of the constraint.
type - the type
isClassifier - indicating whether the Constraint uses a classifier or not
classifier - the ClassifierRole if necessary.
method - The referenced Method