vocleditor.commands
Class EditMethodCommand

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

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

Author:
tugstugi Command class for edit the place properties.

Constructor Summary
EditMethodCommand()
          The default constructor.
 
Method Summary
 void execute()
          Executes the command.
 void redo()
          Redo command execution.
 void setChangedParameters(java.util.Hashtable changedParameters)
          Sets the the hashtable of changed parameters.
 void setCommandAttributes(java.lang.String name, java.lang.String returnType, java.lang.String returnVarNameNew, java.util.Hashtable changedParameters, java.util.List parameters)
          Sets the command attributes.
 void setMethod(VOCLModel.Method method)
          Sets the method.
 void setName(java.lang.String name)
          Sets the method name.
 void setParameters(java.util.List parameters)
          Sets the parameter list.
 void setReturnType(java.lang.String type)
          Sets the method return type.
 void setReturnVariableName(java.lang.String returnVariableName)
          Sets the return variable's name.
 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

EditMethodCommand

public EditMethodCommand()
The default constructor.

Method Detail

setMethod

public void setMethod(VOCLModel.Method method)
Sets the method.

Parameters:
method - the method to set.

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

setName

public void setName(java.lang.String name)
Sets the method name.

Parameters:
name - the method name to set

setReturnType

public void setReturnType(java.lang.String type)
Sets the method return type.

Parameters:
type - the method return type to set

setReturnVariableName

public void setReturnVariableName(java.lang.String returnVariableName)
Sets the return variable's name.

Parameters:
returnVariableName - the new name of the return variable

setParameters

public void setParameters(java.util.List parameters)
Sets the parameter list.

Parameters:
parameters - the parameters list to set

setChangedParameters

public void setChangedParameters(java.util.Hashtable changedParameters)
Sets the the hashtable of changed parameters.

Parameters:
changedParameters - the hashtable of changed parameters.

setCommandAttributes

public void setCommandAttributes(java.lang.String name,
                                 java.lang.String returnType,
                                 java.lang.String returnVarNameNew,
                                 java.util.Hashtable changedParameters,
                                 java.util.List parameters)
Sets the command attributes.

Parameters:
name - the method
returnType - the return variable's type
returnVarNameNew - the new return variable's name
changedParameters - the list of changed parameters
parameters - the parameter list