Diagnostic

public class Diagnostic

Represents a potential problem with part of the model.

Constructors

Diagnostic

protected Diagnostic(APIClient client)

Internal constructor

Methods

fromProtobuf

public static Diagnostic fromProtobuf(APIClient client, Out.CocoDiagnostic inputValue)

Internal constructor

getCategory

public final io.cocotec.coco.platform.coco.DiagnosticCategory getCategory()

The category the diagnostic lies in.

getFixItHints

public final java.util.ArrayList<io.cocotec.coco.platform.coco.FixItHint> getFixItHints()

Fixits for this diagnostic.

getHighlightRange

public final io.cocotec.coco.platform.coco.SourceRange getHighlightRange()

The range of the source file that should be highlighted to show the error.

getId

public final io.cocotec.coco.platform.coco.DiagnosticId getId()

The identity of this diagnostic.

getMessage

public final String getMessage()

The diagnostic message.

getNode

public final io.cocotec.coco.platform.coco.Node getNode()

The erroneous node of the AST. This may not be valid if the AST has not yet been built.

getPosition

public final io.cocotec.coco.platform.coco.SourcePosition getPosition()

The erroneous node of the AST. This may not be valid if the AST has not yet been built.

getSeverity

public final io.cocotec.coco.platform.Severity getSeverity()

The severity of the diagnostic.