|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtext.builder.preferences.StatusInfo
public class StatusInfo
Initially copied from Jdt.
Field Summary | |
---|---|
static org.eclipse.core.runtime.IStatus |
OK_STATUS
|
Fields inherited from interface org.eclipse.core.runtime.IStatus |
---|
CANCEL, ERROR, INFO, OK, WARNING |
Constructor Summary | |
---|---|
StatusInfo()
|
|
StatusInfo(int severity,
java.lang.String message)
|
Method Summary | |
---|---|
org.eclipse.core.runtime.IStatus[] |
getChildren()
Returns a list of status object immediately contained in this multi-status, or an empty list if this is not a multi-status. |
int |
getCode()
Returns the plug-in-specific status code describing the outcome. |
java.lang.Throwable |
getException()
Returns the relevant low-level exception, or null if none. |
java.lang.String |
getMessage()
Returns the message describing the outcome. |
java.lang.String |
getPlugin()
Returns the unique identifier of the plug-in associated with this status (this is the plug-in that defines the meaning of the status code). |
int |
getSeverity()
Returns the severity. |
boolean |
isError()
|
boolean |
isInfo()
|
boolean |
isMultiStatus()
Returns whether this status is a multi-status. |
boolean |
isOK()
Returns whether this status indicates everything is okay (neither info, warning, nor error). |
boolean |
isWarning()
|
boolean |
matches(int severityMask)
Returns whether the severity of this status matches the given severity mask. |
void |
setError(java.lang.String errorMessage)
|
void |
setInfo(java.lang.String infoMessage)
|
void |
setOK()
|
void |
setWarning(java.lang.String warningMessage)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final org.eclipse.core.runtime.IStatus OK_STATUS
Constructor Detail |
---|
public StatusInfo()
public StatusInfo(int severity, java.lang.String message)
Method Detail |
---|
public boolean isOK()
org.eclipse.core.runtime.IStatus
isOK
in interface org.eclipse.core.runtime.IStatus
true
if this status has severity
OK
, and false
otherwisepublic boolean isWarning()
public boolean isInfo()
public boolean isError()
public java.lang.String getMessage()
org.eclipse.core.runtime.IStatus
getMessage
in interface org.eclipse.core.runtime.IStatus
public void setError(java.lang.String errorMessage)
public void setWarning(java.lang.String warningMessage)
public void setInfo(java.lang.String infoMessage)
public void setOK()
public boolean matches(int severityMask)
org.eclipse.core.runtime.IStatus
OK
will never match; use isOK
instead to detect
a status with a severity of OK
.
matches
in interface org.eclipse.core.runtime.IStatus
severityMask
- a mask formed by bitwise or'ing severity mask
constants (ERROR
, WARNING
,
INFO
, CANCEL
)
true
if there is at least one match,
false
if there are no matchesIStatus.getSeverity()
,
IStatus.CANCEL
,
IStatus.ERROR
,
IStatus.WARNING
,
IStatus.INFO
public boolean isMultiStatus()
org.eclipse.core.runtime.IStatus
The severity of a multi-status is derived from the severities
of its children; a multi-status with no children is
OK
by definition.
A multi-status carries a plug-in identifier, a status code,
a message, and an optional exception. Clients may treat
multi-status objects in a multi-status unaware way.
isMultiStatus
in interface org.eclipse.core.runtime.IStatus
true
for a multi-status,
false
otherwiseIStatus.getChildren()
public int getSeverity()
org.eclipse.core.runtime.IStatus
CANCEL
- cancelation occurredERROR
- a serious error (most severe)WARNING
- a warning (less severe)INFO
- an informational ("fyi") message (least severe)OK
- everything is just fine
The severity of a multi-status is defined to be the maximum
severity of any of its children, or OK
if it has
no children.
getSeverity
in interface org.eclipse.core.runtime.IStatus
OK
, ERROR
,
INFO
, WARNING
, or CANCEL
IStatus.matches(int)
public java.lang.String getPlugin()
org.eclipse.core.runtime.IStatus
getPlugin
in interface org.eclipse.core.runtime.IStatus
public java.lang.Throwable getException()
org.eclipse.core.runtime.IStatus
null
if none.
For example, when an operation fails because of a network communications
failure, this might return the java.io.IOException
describing the exact nature of that failure.
getException
in interface org.eclipse.core.runtime.IStatus
null
if nonepublic int getCode()
org.eclipse.core.runtime.IStatus
getCode
in interface org.eclipse.core.runtime.IStatus
public org.eclipse.core.runtime.IStatus[] getChildren()
org.eclipse.core.runtime.IStatus
getChildren
in interface org.eclipse.core.runtime.IStatus
IStatus.isMultiStatus()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |