public class StatusInfo
extends java.lang.Object
implements org.eclipse.core.runtime.IStatus
Modifier and Type | Field and Description |
---|---|
static org.eclipse.core.runtime.IStatus |
OK_STATUS |
Constructor and Description |
---|
StatusInfo()
Creates a status set to OK (no message)
|
StatusInfo(int severity,
java.lang.String message)
Creates a status .
|
Modifier and Type | Method and Description |
---|---|
org.eclipse.core.runtime.IStatus[] |
getChildren()
Returns always an empty array.
|
int |
getCode()
Returns always the error severity.
|
java.lang.Throwable |
getException()
Returns always
null . |
java.lang.String |
getMessage() |
java.lang.String |
getPlugin() |
int |
getSeverity() |
boolean |
isError()
Returns if the status' severity is ERROR.
|
boolean |
isInfo()
Returns if the status' severity is INFO.
|
boolean |
isMultiStatus()
Returns always
false . |
boolean |
isOK()
Returns if the status' severity is OK.
|
boolean |
isWarning()
Returns if the status' severity is WARNING.
|
boolean |
matches(int severityMask) |
void |
setError(java.lang.String errorMessage)
Sets the status to ERROR.
|
void |
setInfo(java.lang.String infoMessage)
Sets the status to INFO.
|
void |
setOK()
Sets the status to OK.
|
void |
setWarning(java.lang.String warningMessage)
Sets the status to WARNING.
|
java.lang.String |
toString()
Returns a string representation of the status, suitable for debugging purposes only.
|
public StatusInfo()
public StatusInfo(int severity, java.lang.String message)
severity
- The status severity: ERROR, WARNING, INFO and OK.message
- The message of the status. Applies only for ERROR, WARNING and INFO.public boolean isOK()
isOK
in interface org.eclipse.core.runtime.IStatus
public boolean isWarning()
public boolean isInfo()
public boolean isError()
public java.lang.String getMessage()
getMessage
in interface org.eclipse.core.runtime.IStatus
IStatus.getMessage()
public void setError(java.lang.String errorMessage)
errorMessage
- The error message (can be empty, but not null)public void setWarning(java.lang.String warningMessage)
warningMessage
- The warning message (can be empty, but not null)public void setInfo(java.lang.String infoMessage)
infoMessage
- The info message (can be empty, but not null)public void setOK()
public boolean matches(int severityMask)
matches
in interface org.eclipse.core.runtime.IStatus
public boolean isMultiStatus()
false
.isMultiStatus
in interface org.eclipse.core.runtime.IStatus
IStatus.isMultiStatus()
public int getSeverity()
getSeverity
in interface org.eclipse.core.runtime.IStatus
public java.lang.String getPlugin()
getPlugin
in interface org.eclipse.core.runtime.IStatus
public java.lang.Throwable getException()
null
.getException
in interface org.eclipse.core.runtime.IStatus
IStatus.getException()
public int getCode()
getCode
in interface org.eclipse.core.runtime.IStatus
IStatus.getCode()
public org.eclipse.core.runtime.IStatus[] getChildren()
getChildren
in interface org.eclipse.core.runtime.IStatus
IStatus.getChildren()
public java.lang.String toString()
toString
in class java.lang.Object