Module jEdit

Interface TokenHandler

All Known Implementing Classes:
DefaultTokenHandler, DisplayTokenHandler, DummyTokenHandler

public interface TokenHandler
Token markers send tokens to implementations of this interface.
Since:
jEdit 4.1pre1
Version:
$Id: TokenHandler.java 21831 2012-06-18 22:54:17Z ezust $
Author:
Slava Pestov
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    void
    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).
  • Method Details

    • handleToken

      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.
      Parameters:
      seg - The segment containing the text
      id - The token type (one of the constants in the Token class).
      offset - The start offset of the token
      length - The number of characters in the token
      context - The line context
      Since:
      jEdit 4.2pre3
    • setLineContext

      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).
      Since:
      jEdit 4.2pre6