public class BasicDiagnostic extends java.lang.Object implements Diagnostic, DiagnosticChain
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<Diagnostic> |
children
The message.
|
protected int |
code
The code.
|
protected java.util.List<?> |
data
The data.
|
protected java.lang.String |
message
The message.
|
protected int |
severity
The severity.
|
protected java.lang.String |
source
The source.
|
CANCEL, CANCEL_INSTANCE, ERROR, INFO, OK, OK_INSTANCE, WARNING| Constructor and Description |
|---|
BasicDiagnostic()
Default Constructor (no initialization for local parameters)
|
BasicDiagnostic(int severity,
java.lang.String source,
int code,
java.lang.String message,
java.lang.Object[] data) |
BasicDiagnostic(java.lang.String source,
int code,
java.util.List<? extends Diagnostic> children,
java.lang.String message,
java.lang.Object[] data) |
BasicDiagnostic(java.lang.String source,
int code,
java.lang.String message,
java.lang.Object[] data) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Diagnostic diagnostic)
Adds the diagnostic to the chain.
|
void |
addAll(Diagnostic diagnostic)
Adds the
children of the diagnostic to the chain. |
protected java.util.List<?> |
dataAsList(java.lang.Object[] data) |
java.util.List<Diagnostic> |
getChildren()
Returns the list of child
diagnostics. |
int |
getCode()
Returns
source-specific identity code. |
java.util.List<?> |
getData()
Returns the arbitrary associated list of data.
|
java.lang.Throwable |
getException()
Returns the first throwable object available in the
data list,
which is set when this diagnostic is instantiated. |
java.lang.String |
getMessage()
Returns a message describing the situation.
|
int |
getSeverity()
Returns an indicator of the severity of the problem.
|
java.lang.String |
getSource()
Returns the unique identifier of the source.
|
void |
merge(Diagnostic diagnostic)
|
int |
recomputeSeverity() |
protected void |
setCode(int code) |
protected void |
setSeverity(int severity) |
protected void |
setSource(java.lang.String source) |
static Diagnostic |
toDiagnostic(IStatus status) |
static IStatus |
toIStatus(Diagnostic diagnostic)
Returns the diagnostic viewed as an
IStatus. |
static IStatus |
toIStatus(DiagnosticException diagnosticException)
Returns the diagnostic exception viewed as an
IStatus. |
java.lang.String |
toString() |
protected int severity
getSeverity()protected java.lang.String message
getMessage()protected java.util.List<Diagnostic> children
getMessage()protected java.util.List<?> data
getData()protected java.lang.String source
getSource()protected int code
getCode()public BasicDiagnostic()
public BasicDiagnostic(java.lang.String source,
int code,
java.lang.String message,
java.lang.Object[] data)
public BasicDiagnostic(int severity,
java.lang.String source,
int code,
java.lang.String message,
java.lang.Object[] data)
public BasicDiagnostic(java.lang.String source,
int code,
java.util.List<? extends Diagnostic> children,
java.lang.String message,
java.lang.Object[] data)
protected java.util.List<?> dataAsList(java.lang.Object[] data)
protected void setSeverity(int severity)
public int getSeverity()
DiagnosticgetSeverity in interface Diagnosticpublic java.lang.String getMessage()
DiagnosticgetMessage in interface Diagnosticpublic java.util.List<?> getData()
DiagnosticgetData in interface Diagnosticpublic java.util.List<Diagnostic> getChildren()
Diagnosticdiagnostics.getChildren in interface Diagnosticprotected void setSource(java.lang.String source)
public java.lang.String getSource()
DiagnosticgetSource in interface Diagnosticprotected void setCode(int code)
public int getCode()
Diagnosticsource-specific identity code.getCode in interface Diagnosticpublic void add(Diagnostic diagnostic)
DiagnosticChainadd in interface DiagnosticChainpublic void addAll(Diagnostic diagnostic)
DiagnosticChainchildren of the diagnostic to the chain.addAll in interface DiagnosticChainpublic void merge(Diagnostic diagnostic)
DiagnosticChainmerge in interface DiagnosticChainpublic int recomputeSeverity()
public java.lang.Throwable getException()
data list,
which is set when this diagnostic is instantiated.getException in interface Diagnosticpublic java.lang.String toString()
toString in class java.lang.Objectpublic static IStatus toIStatus(Diagnostic diagnostic)
IStatus.public static IStatus toIStatus(DiagnosticException diagnosticException)
IStatus.public static Diagnostic toDiagnostic(IStatus status)
Copyright © 2018. Licensed under the Eclipse Public License v1.0. All rights reserved.
Submit a bug or feature