java.lang.Object
org.gjt.sp.jedit.syntax.DummyTokenHandler
- All Implemented Interfaces:
TokenHandler
A dummy token handler that discards tokens.
- Since:
- jEdit 4.1pre1
- Version:
- $Id: DummyTokenHandler.java 25244 2020-04-15 15:14:49Z kpouer $
- Author:
- Slava Pestov
-
Field Summary
Modifier and TypeFieldDescriptionstatic final DummyTokenHandler
To avoid having to create new instances of this class, use this variable. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleToken
(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).
-
Field Details
-
INSTANCE
To avoid having to create new instances of this class, use this variable. This is allowed because instances of this class do not store any state.
-
-
Constructor Details
-
DummyTokenHandler
public DummyTokenHandler()
-
-
Method Details
-
handleToken
public void handleToken(Segment seg, byte id, int offset, int length, TokenMarker.LineContext context) Called by the token marker when a syntax token has been parsed.- Specified by:
handleToken
in interfaceTokenHandler
- Parameters:
seg
- The segment containing the textid
- The token type (one of the constants in theToken
class).offset
- The start offset of the tokenlength
- The number of characters in the tokencontext
- The line context- Since:
- jEdit 4.2pre3
-
setLineContext
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).- Specified by:
setLineContext
in interfaceTokenHandler
- Since:
- jEdit 4.2pre6
-