Class Diagnostic
java.lang.Object
org.graalvm.tools.lsp.server.types.JSONBase
org.graalvm.tools.lsp.server.types.Diagnostic
Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid
in the scope of a resource.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Diagnosticcreate(Range range, String message, DiagnosticSeverity severity, Object code, String source, List<DiagnosticRelatedInformation> relatedInformation) Creates a new Diagnostic literal.booleangetCode()The diagnostic's code, which usually appear in the user interface.The diagnostic's message.getRange()The range at which the message applies.An array of related diagnostic information, e.g.The diagnostic's severity.A human-readable string describing the source of this diagnostic, e.g.getTags()Additional metadata about the diagnostic.inthashCode()setMessage(String message) setRelatedInformation(List<DiagnosticRelatedInformation> relatedInformation) setSeverity(DiagnosticSeverity severity) setTags(List<DiagnosticTag> tags)
-
Method Details
-
getRange
The range at which the message applies. -
setRange
-
getSeverity
The diagnostic's severity. Can be omitted. If omitted it is up to the client to interpret diagnostics as error, warning, info or hint. -
setSeverity
-
getCode
The diagnostic's code, which usually appear in the user interface. -
setCode
-
getSource
A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'. It usually appears in the user interface. -
setSource
-
getMessage
The diagnostic's message. It usually appears in the user interface -
setMessage
-
getTags
Additional metadata about the diagnostic. -
setTags
-
getRelatedInformation
An array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property. -
setRelatedInformation
-
equals
-
hashCode
public int hashCode() -
create
public static Diagnostic create(Range range, String message, DiagnosticSeverity severity, Object code, String source, List<DiagnosticRelatedInformation> relatedInformation) Creates a new Diagnostic literal.
-