org.eclipse.gmt.umlx.editor.commands
Class ResetValueCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by org.eclipse.gmt.umlx.editor.command.AbstractCommand
          extended by org.eclipse.gmt.umlx.editor.commands.AbstractValueCommand
              extended by org.eclipse.gmt.umlx.editor.commands.ResetValueCommand
All Implemented Interfaces:
IAbstractCommand

public class ResetValueCommand
extends AbstractValueCommand

A Command used to restore the default value of a property.


Constructor Summary
ResetValueCommand(java.lang.String propLabel, IModelPropertyDescriptor descriptor)
          Default Constructor: Sets the label for the Command
 
Method Summary
 boolean canExecute()
          Returns true IFF:
1) the target and property have been specified
2) the property has a default value
3) the value set for that property is not the default
 
Methods inherited from class org.eclipse.gmt.umlx.editor.commands.AbstractValueCommand
toString
 
Methods inherited from class org.eclipse.gmt.umlx.editor.command.AbstractCommand
addSelectedObjects, canUndo, couldNotUnlock, diagnoseCannotExecute, dispose, execute, getCommand, prepare, prepare, redo, requestModification, undo
 
Methods inherited from class org.eclipse.gef.commands.Command
chain, getDebugLabel, getLabel, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.command.IAbstractCommand
getLabel
 

Constructor Detail

ResetValueCommand

public ResetValueCommand(java.lang.String propLabel,
                         IModelPropertyDescriptor descriptor)
Default Constructor: Sets the label for the Command

Since:
3.1
Method Detail

canExecute

public boolean canExecute()
Returns true IFF:
1) the target and property have been specified
2) the property has a default value
3) the value set for that property is not the default

Specified by:
canExecute in interface IAbstractCommand
Overrides:
canExecute in class AbstractCommand
See Also:
Command.canExecute()