Class TokenMarker


  • public class TokenMarker
    extends java.lang.Object
    A token marker splits lines of text into tokens. Each token carries a length field and an identification tag that can be mapped to a color or font style for painting that token.
    See Also:
    Token, TokenHandler
    • Field Detail

      • EMPTY_PARSER_RULE_SETS_ARRAY

        public static final ParserRuleSet[] EMPTY_PARSER_RULE_SETS_ARRAY
    • Constructor Detail

      • TokenMarker

        public TokenMarker()
    • Method Detail

      • getRuleSet

        public ParserRuleSet getRuleSet​(java.lang.String setName)
      • getRuleSets

        public ParserRuleSet[] getRuleSets()
        Since:
        jEdit 4.2pre3
      • markTokens

        public TokenMarker.LineContext markTokens​(TokenMarker.LineContext prevContext,
                                                  TokenHandler tokenHandler,
                                                  javax.swing.text.Segment line)
        Do not call this method directly; call Buffer.markTokens() instead.
        Parameters:
        prevContext - the context of the previous line, it can be null
        tokenHandler - the token handler
        line - a segment containing the content of the line