public interface ParserNotice extends Comparable<ParserNotice>
Since different parsers have different levels of precision when it comes
to identifying errors in code, this class supports marking parser notices
on either a per-line basis or arbitrary regions of a document. For any
ParserNotice
, getLine()
is guaranteed to return the
(primary) line containing the notice, but getOffset()
and
getLength()
are allowed to return -1
if that
particular notice isn't mapped to a specific region of code. Applications
can check whether an instance of this class only has line-level information
with the
DefaultParserNotice
Modifier and Type | Interface and Description |
---|---|
static class |
ParserNotice.Level
Denotes the severity of a parser notice.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsPosition(int pos)
Returns whether this parser notice contains the specified location
in the document.
|
Color |
getColor()
Returns the color to use when painting this notice.
|
boolean |
getKnowsOffsetAndLength()
Returns whether this parser notice has offset and length information
(as opposed to just what line number to mark).
|
int |
getLength()
Returns the length of the code the message is concerned with.
|
ParserNotice.Level |
getLevel()
Returns the level of this notice.
|
int |
getLine()
Returns the line number the notice is about.
|
String |
getMessage()
Returns the message from the parser.
|
int |
getOffset()
Returns the offset of the code the message is concerned with.
|
Parser |
getParser()
Returns the parser that created this message.
|
boolean |
getShowInEditor()
Whether a squiggle underline should be drawn in the editor for this
notice.
|
String |
getToolTipText()
Returns the tool tip text to display for this notice.
|
compareTo
boolean containsPosition(int pos)
pos
- The position in the document.false
if getOffset()
returns
-1
.Color getColor()
int getLength()
-1
if unknown.getOffset()
,
getLine()
ParserNotice.Level getLevel()
ParserNotice.Level
enumeration.int getLine()
boolean getKnowsOffsetAndLength()
getLine()
,
getOffset()
,
getLength()
String getMessage()
int getOffset()
-1
if unknown.getLength()
,
getLine()
Parser getParser()
boolean getShowInEditor()
String getToolTipText()
getMessage()
.Copyright © 2003–2015. All rights reserved.