The status object represents the result of an operation. Each message that arises has a status object indicating what happened during execution. More information can be found in the documentation for org.eclipse.core.runtime.IStatus.
A status object contains the following information:
- plug-in identifier (required)
- severity (required)
- status code (required)
- message (required)
- exception (optional)
The status object contains the following fields:
Field | Modifier and type | Description |
---|---|---|
CANCEL | static int | Status indicates that an operation has been interrupted. |
ERROR | static int | Status indicates that an error has occurred. |
INFO | static int | Status indicates that information is merely being provided. |
[OK] | static int | Status indicates that the operation was executed in an error-free manner. |
WARNING | static int | Status indicates that a warning has occurred. |
The following methods are available to the status object:
Method | Modifier and type | Description |
---|---|---|
getChildren() | IStatus[ ] | Returns a list of the direct child-objects or an empty list if it is not multi-status. |
getCode() | int | Returns a status code that is specific to the plug-in and that describes the result of the operation. |
getException() | Throwable | Returns the relevant low-level exception or null if there is no exception. |
getMessage() | String | Returns the descriptive message on the result of the operation. |
getPlugin() | String | Returns a unique ID for the plug-in in connection with this status. |
getSeverity() | int | Returns the severity of the message. |
isMultiStatus() | Boolean | Returns true if the entity in question is a multi-status object. |
isOK() | Boolean | Returns true if the operation was executed in an error-free manner. |
matches(int severityMask) | Boolean | Returns true if the severity corresponds to the declared severity. |