|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.commands.operations.AbstractOperation
org.eclipse.gmf.runtime.common.core.command.AbstractCommand
org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand
public class UnexecutableCommand
A command that cannot be executed. This is an implementation of the Null
Object pattern that can be used to provide a command object that can't be
executed to clients who require an
ICommand
.
Field Summary | |
---|---|
static UnexecutableCommand |
INSTANCE
The singleton instance. |
Constructor Summary | |
---|---|
protected |
UnexecutableCommand()
Creates an instance of an unexecutable command. |
Method Summary | |
---|---|
boolean |
canExecute()
|
boolean |
canRedo()
|
boolean |
canUndo()
|
protected CommandResult |
doExecuteWithResult(IProgressMonitor progressMonitor,
IAdaptable info)
Performs the actual work of executing this command. |
protected CommandResult |
doRedoWithResult(IProgressMonitor progressMonitor,
IAdaptable info)
Performs the actual work of redoing this command. |
protected CommandResult |
doUndoWithResult(IProgressMonitor progressMonitor,
IAdaptable info)
Performs the actual work of undoing this command. |
Methods inherited from class org.eclipse.gmf.runtime.common.core.command.AbstractCommand |
---|
compose, dispose, execute, getAffectedFiles, getCommandResult, internalSetResult, redo, reduce, setResult, undo |
Methods inherited from class org.eclipse.core.commands.operations.AbstractOperation |
---|
addContext, getContexts, getLabel, hasContext, removeContext, setLabel, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.gmf.runtime.common.core.command.ICommand |
---|
setLabel |
Methods inherited from interface org.eclipse.core.commands.operations.IUndoableOperation |
---|
addContext, getContexts, getLabel, hasContext, removeContext |
Field Detail |
---|
public static final UnexecutableCommand INSTANCE
Constructor Detail |
---|
protected UnexecutableCommand()
Method Detail |
---|
protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException
AbstractCommand
doExecuteWithResult
in class AbstractCommand
progressMonitor
- the progress monitor provided by the operation history. Must
never be null
.info
- the IAdaptable (or null
) provided by the
caller in order to supply UI information for prompting the
user if necessary. When this parameter is not
null
, it should minimally contain an adapter
for the org.eclipse.swt.widgets.Shell.class.
null
if the execution status is OK, but there is no meaningful result
to be returned.
java.lang.UnsupportedOperationException
ExecutionException
- if, for some reason, I fail to complete the operationprotected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException
AbstractCommand
doRedoWithResult
in class AbstractCommand
progressMonitor
- the progress monitor provided by the operation history. Must
never be null
.info
- the IAdaptable (or null
) provided by the
caller in order to supply UI information for prompting the
user if necessary. When this parameter is not
null
, it should minimally contain an adapter
for the org.eclipse.swt.widgets.Shell.class.
null
if the execution status is OK, but there is no meaningful result
to be returned.
java.lang.UnsupportedOperationException
ExecutionException
- on failure to redoprotected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException
AbstractCommand
doUndoWithResult
in class AbstractCommand
progressMonitor
- the progress monitor provided by the operation history. Must
never be null
.info
- the IAdaptable (or null
) provided by the
caller in order to supply UI information for prompting the
user if necessary. When this parameter is not
null
, it should minimally contain an adapter
for the org.eclipse.swt.widgets.Shell.class.
null
if the execution status is OK, but there is no meaningful result
to be returned.
java.lang.UnsupportedOperationException
ExecutionException
- on failure to undopublic boolean canExecute()
canExecute
in interface IUndoableOperation
canExecute
in class AbstractOperation
public boolean canRedo()
canRedo
in interface IUndoableOperation
canRedo
in class AbstractOperation
public boolean canUndo()
canUndo
in interface IUndoableOperation
canUndo
in class AbstractOperation
|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.