public interface OperationStatus
extends org.eclipse.core.runtime.IStatus
Operation
.
This interface is not intended to be implemented by clients.
Operation.getStatus()
,
StatusWriter
Modifier and Type | Interface and Description |
---|---|
static class |
OperationStatus.State
Reflects the execution state of an
Operation . |
Modifier and Type | Method and Description |
---|---|
void |
add(org.eclipse.core.runtime.IStatus status)
Adds the given child status to this parent status.
|
OperationStatus |
addError(String message,
EObject... relatedObjects)
Creates a new status of severity
ERROR as a child of this status. |
OperationStatus |
addError(String message,
Throwable exception,
EObject... relatedObjects)
Creates a new status of severity
ERROR as a child of this status. |
OperationStatus |
addInfo(String message,
EObject... relatedObjects)
Creates a new status of severity
INFO as a child of this status. |
OperationStatus |
addWarning(String message,
EObject... relatedObjects)
Creates a new status of severity
WARNING as a child of this status. |
OperationStatus |
addWarning(String message,
Throwable exception,
EObject... relatedObjects)
Creates a new status of severity
WARNING as a child of this status. |
long |
getOperationDuration()
Returns the duration in milliseconds of the owning
Operation execution. |
long |
getOperationEnd()
Returns the time in milliseconds at which the owning
Operation execution has terminated. |
long |
getOperationStart()
Returns the time in milliseconds at which the owning
Operation execution has started. |
OperationStatus |
getParent()
Returns the parent status which owns this status, if any.
|
Collection<EObject> |
getRelatedObjects()
Returns an unmodifiable list of related model elements.
|
OperationStatus.State |
getState()
Returns the execution state of the owning operation
|
OperationStatus.State getState()
OperationStatus getParent()
null
if none.Collection<EObject> getRelatedObjects()
OperationStatus
.addError(String, EObject...)
void add(org.eclipse.core.runtime.IStatus status)
Operation
,
to log additional information useful for a developer for post-execution analysis.status
- the new child statusOperation.run(org.eclipse.core.runtime.IProgressMonitor)
OperationStatus addInfo(String message, EObject... relatedObjects)
INFO
as a child of this status.
Associating one or more related model elements enables to review problems by inspecting the model in the log generated on main operation completion, rather than navigating only in the execution flow.
message
- the message associated with the status to create.relatedObjects
- an optional list of related model elements.OperationStatus addWarning(String message, EObject... relatedObjects)
WARNING
as a child of this status.
Associating one or more related model elements enables to review problems by inspecting the model in the log generated on main operation completion, rather than navigating only in the execution flow.
message
- the message associated with the status to create.relatedObjects
- an optional list of related model elements.OperationStatus addWarning(String message, Throwable exception, EObject... relatedObjects)
WARNING
as a child of this status.
Associating one or more related model elements enables to review problems by inspecting the model in the log generated on main operation completion, rather than navigating only in the execution flow.
message
- the message associated with the status to create.exception
- the exception associated with the status to create.relatedObjects
- an optional list of related model elements.OperationStatus addError(String message, EObject... relatedObjects)
ERROR
as a child of this status.
Associating one or more related model elements enables to review problems by inspecting the model in the log generated on main operation completion, rather than navigating only in the execution flow.
message
- the message associated with the status to create.relatedObjects
- an optional list of related model elements.OperationStatus addError(String message, Throwable exception, EObject... relatedObjects)
ERROR
as a child of this status.
Associating one or more related model elements enables to review problems by inspecting the model in the log generated on main operation completion, rather than navigating only in the execution flow.
message
- the message associated with the status to create.exception
- the exception associated with the status to create.relatedObjects
- an optional list of related model elements.long getOperationStart()
Operation
execution has started.Operation
execution has started,
or 0
if the execution isn't started.System.currentTimeMillis()
long getOperationEnd()
Operation
execution has terminated.Operation
execution has terminated,
or 0
if the execution isn't terminated.System.currentTimeMillis()
long getOperationDuration()
Operation
execution.Operation
execution.