org.eclipse.emf.edit.provider
Class DelegatingWrapperItemProvider.AffectedObjectsWrappingCommandActionDelegate
java.lang.Object
org.eclipse.emf.common.command.AbstractCommand
org.eclipse.emf.common.command.CommandWrapper
org.eclipse.emf.edit.provider.DelegatingWrapperItemProvider.AffectedObjectsWrappingCommand
org.eclipse.emf.edit.provider.DelegatingWrapperItemProvider.AffectedObjectsWrappingCommandActionDelegate
- All Implemented Interfaces:
- Command, CommandActionDelegate
- Enclosing class:
- DelegatingWrapperItemProvider
protected class DelegatingWrapperItemProvider.AffectedObjectsWrappingCommandActionDelegate
- extends DelegatingWrapperItemProvider.AffectedObjectsWrappingCommand
- implements CommandActionDelegate
An AffectedObjectsWrappingCommandActionDelegate
wraps another command that also implements
CommandActionDelegate
, to substitute this wrapper for its value and child wrappers for their
corresponding child values, whenever they appear in the affected objects. Action delegate methods are delegated
directly to the wrapped command.
Methods inherited from class org.eclipse.emf.common.command.CommandWrapper |
canUndo, createCommand, dispose, execute, getCommand, getLabel, getResult, prepare, redo, toString, undo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DelegatingWrapperItemProvider.AffectedObjectsWrappingCommandActionDelegate
public DelegatingWrapperItemProvider.AffectedObjectsWrappingCommandActionDelegate(CommandActionDelegate command)
- Returns a new
AffectedObjectsWrappingCommandActionDelegate
for the given command.
- Throws:
java.lang.ClassCastException
- If the specified command does not implement Command
.
canExecute
public boolean canExecute()
- Description copied from class:
AbstractCommand
- Calls
AbstractCommand.prepare()
,
caches the result in AbstractCommand.isExecutable
,
and sets AbstractCommand.isPrepared
to true
;
from then on, it will yield the value of isExecutable.
- Specified by:
canExecute
in interface Command
- Specified by:
canExecute
in interface CommandActionDelegate
- Overrides:
canExecute
in class AbstractCommand
- Returns:
- whether the command can execute.
getImage
public java.lang.Object getImage()
- Description copied from interface:
CommandActionDelegate
- This returns the decoration, if any, of the action.
- Specified by:
getImage
in interface CommandActionDelegate
getText
public java.lang.String getText()
- Description copied from interface:
CommandActionDelegate
- This returns the menu text, if any, of the action.
- Specified by:
getText
in interface CommandActionDelegate
getDescription
public java.lang.String getDescription()
- Description copied from class:
CommandWrapper
- Delegates to the getDescription method of the command.
- Specified by:
getDescription
in interface Command
- Specified by:
getDescription
in interface CommandActionDelegate
- Overrides:
getDescription
in class CommandWrapper
- Returns:
- the description.
getToolTipText
public java.lang.String getToolTipText()
- Description copied from interface:
CommandActionDelegate
- This returns the tool tip text, if any, of the action.
- Specified by:
getToolTipText
in interface CommandActionDelegate