public class DummyTokenHandler extends java.lang.Object implements TokenHandler
Modifier and Type | Field and Description |
---|---|
static DummyTokenHandler |
INSTANCE
To avoid having to create new instances of this class, use
this variable.
|
Constructor and Description |
---|
DummyTokenHandler() |
Modifier and Type | Method and Description |
---|---|
void |
handleToken(javax.swing.text.Segment seg,
byte id,
int offset,
int length,
TokenMarker.LineContext context)
Called by the token marker when a syntax token has been parsed.
|
void |
setLineContext(TokenMarker.LineContext lineContext)
The token handler can compare this object with the object
previously given for this line to see if the token type at the end
of the line has changed (meaning subsequent lines might need to be
retokenized).
|
public static final DummyTokenHandler INSTANCE
public void handleToken(javax.swing.text.Segment seg, byte id, int offset, int length, TokenMarker.LineContext context)
handleToken
in interface TokenHandler
seg
- The segment containing the textid
- The token type (one of the constants in the
Token
class).offset
- The start offset of the tokenlength
- The number of characters in the tokencontext
- The line contextpublic void setLineContext(TokenMarker.LineContext lineContext)
setLineContext
in interface TokenHandler