|
Runtime | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.gmf.runtime.common.core.command.CommandResult
public final class CommandResult
The result of a command execution. Command results have an IStatus and optionally a return value (if applicable). GMF commands are assigned a command result when they are executed, undone, or redone.
IStatus| Constructor Summary | |
|---|---|
CommandResult(IStatus status)
Constructs a new command result with the specified status and a default return value. |
|
CommandResult(IStatus status,
java.lang.Object returnValue)
Constructs a new command result with the specified status and return value. |
|
| Method Summary | |
|---|---|
java.lang.Object |
getReturnValue()
The value returned by the execute, undo or redo of a GMF operation. |
IStatus |
getStatus()
Retrieves the status of the command that is executed, undone or redone. |
static CommandResult |
newCancelledCommandResult()
Creates a new IStatus.CANCEL command result with no return value. |
static CommandResult |
newErrorCommandResult(java.lang.String errorMessage)
Creates a new IStatus.ERROR command result with no return value. |
static CommandResult |
newErrorCommandResult(java.lang.Throwable throwable)
Creates a new IStatus.ERROR command result with no return value. |
static CommandResult |
newOKCommandResult()
Creates a new IStatus.OK command result. |
static CommandResult |
newOKCommandResult(java.lang.Object result)
Creates a new IStatus.OK command result with the specified return
value. |
static CommandResult |
newWarningCommandResult(java.lang.String warningMessage,
java.lang.Object result)
Creates a new IStatus.WARNING command result with a return
value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommandResult(IStatus status)
status - The status for the new command result.
public CommandResult(IStatus status,
java.lang.Object returnValue)
status - The status for the new command result.returnValue - The return value for the new command result.| Method Detail |
|---|
public static final CommandResult newOKCommandResult()
IStatus.OK command result.
public static final CommandResult newOKCommandResult(java.lang.Object result)
IStatus.OK command result with the specified return
value.
value - the command return result
valuepublic static final CommandResult newCancelledCommandResult()
IStatus.CANCEL command result with no return value.
public static final CommandResult newErrorCommandResult(java.lang.String errorMessage)
IStatus.ERROR command result with no return value.
errorMessage - the error message
public static final CommandResult newErrorCommandResult(java.lang.Throwable throwable)
IStatus.ERROR command result with no return value.
errorMessage - the error message
public static final CommandResult newWarningCommandResult(java.lang.String warningMessage,
java.lang.Object result)
IStatus.WARNING command result with a return
value.
warningMessage - the warning messagevalue - the command return result
valuepublic IStatus getStatus()
public java.lang.Object getReturnValue()
null
|
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.