Interface OperationStatus
-
- All Superinterfaces:
org.eclipse.core.runtime.IStatus
public interface OperationStatus extends org.eclipse.core.runtime.IStatusDescribes the execution state of the owningOperation.This interface is not intended to be implemented by clients.
- Since:
- 3.5.1
- See Also:
Operation.getStatus(),StatusWriter
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classOperationStatus.StateReflects the execution state of anOperation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(org.eclipse.core.runtime.IStatus status)Adds the given child status to this parent status.OperationStatusaddError(String message, Throwable exception, org.eclipse.emf.ecore.EObject... relatedObjects)Creates a new status of severityERRORas a child of this status.OperationStatusaddError(String message, org.eclipse.emf.ecore.EObject... relatedObjects)Creates a new status of severityERRORas a child of this status.OperationStatusaddInfo(String message, org.eclipse.emf.ecore.EObject... relatedObjects)Creates a new status of severityINFOas a child of this status.OperationStatusaddWarning(String message, Throwable exception, org.eclipse.emf.ecore.EObject... relatedObjects)Creates a new status of severityWARNINGas a child of this status.OperationStatusaddWarning(String message, org.eclipse.emf.ecore.EObject... relatedObjects)Creates a new status of severityWARNINGas a child of this status.longgetOperationDuration()Returns the duration in milliseconds of the owningOperationexecution.longgetOperationEnd()Returns the time in milliseconds at which the owningOperationexecution has terminated.longgetOperationStart()Returns the time in milliseconds at which the owningOperationexecution has started.OperationStatusgetParent()Returns the parent status which owns this status, if any.Collection<org.eclipse.emf.ecore.EObject>getRelatedObjects()Returns an unmodifiable list of related model elements.OperationStatus.StategetState()Returns the execution state of the owning operation
-
-
-
Method Detail
-
getState
OperationStatus.State getState()
Returns the execution state of the owning operation- Returns:
- the execution state.
-
getParent
OperationStatus getParent()
Returns the parent status which owns this status, if any.- Returns:
- the parent status, or
nullif none.
-
getRelatedObjects
Collection<org.eclipse.emf.ecore.EObject> getRelatedObjects()
Returns an unmodifiable list of related model elements. The related model elements can be set when creating an instance ofOperationStatus.- Returns:
- an unmodifiable list of related model elements.
- Since:
- 3.6.0
- See Also:
addError(String, EObject...)
-
add
void add(org.eclipse.core.runtime.IStatus status)
Adds the given child status to this parent status. This method might be called when running the owningOperation, to log additional information useful for a developer for post-execution analysis.- Parameters:
status- the new child status- See Also:
Operation.run(org.eclipse.core.runtime.IProgressMonitor)
-
addInfo
OperationStatus addInfo(String message, org.eclipse.emf.ecore.EObject... relatedObjects)
Creates a new status of severityINFOas 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.
- Parameters:
message- the message associated with the status to create.relatedObjects- an optional list of related model elements.- Returns:
- the created status.
- Since:
- 3.6.0
-
addWarning
OperationStatus addWarning(String message, org.eclipse.emf.ecore.EObject... relatedObjects)
Creates a new status of severityWARNINGas 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.
- Parameters:
message- the message associated with the status to create.relatedObjects- an optional list of related model elements.- Returns:
- the created status.
- Since:
- 3.6.0
-
addWarning
OperationStatus addWarning(String message, Throwable exception, org.eclipse.emf.ecore.EObject... relatedObjects)
Creates a new status of severityWARNINGas 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.
- Parameters:
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.- Returns:
- the created status.
- Since:
- 3.6.0
-
addError
OperationStatus addError(String message, org.eclipse.emf.ecore.EObject... relatedObjects)
Creates a new status of severityERRORas 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.
- Parameters:
message- the message associated with the status to create.relatedObjects- an optional list of related model elements.- Returns:
- the created status.
- Since:
- 3.6.0
-
addError
OperationStatus addError(String message, Throwable exception, org.eclipse.emf.ecore.EObject... relatedObjects)
Creates a new status of severityERRORas 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.
- Parameters:
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.- Returns:
- the created status.
- Since:
- 3.6.0
-
getOperationStart
long getOperationStart()
Returns the time in milliseconds at which the owningOperationexecution has started.- Returns:
- the time in milliseconds at which the owning
Operationexecution has started, or0if the execution isn't started. - See Also:
System.currentTimeMillis()
-
getOperationEnd
long getOperationEnd()
Returns the time in milliseconds at which the owningOperationexecution has terminated.- Returns:
- the time in milliseconds at which the owning
Operationexecution has terminated, or0if the execution isn't terminated. - See Also:
System.currentTimeMillis()
-
getOperationDuration
long getOperationDuration()
Returns the duration in milliseconds of the owningOperationexecution.- Returns:
- the duration in milliseconds of the owning
Operationexecution.
-
-