Class FlatThemeTokenMaker

  • All Implemented Interfaces:
    org.fife.ui.rsyntaxtextarea.TokenMaker

    public class FlatThemeTokenMaker
    extends org.fife.ui.rsyntaxtextarea.modes.PropertiesFileTokenMaker
    Token maker for FlatLaf properties files.

    Lets the super class parse the properties file and modify the added tokens. The super class uses TokenTypes.RESERVED_WORD for property keys and TokenTypes.LITERAL_STRING_DOUBLE_QUOTE for property values.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static int TOKEN_COLOR  
      (package private) static int TOKEN_FUNCTION  
      (package private) static int TOKEN_NUMBER  
      (package private) static int TOKEN_PROPERTY  
      (package private) static int TOKEN_STRING  
      (package private) static int TOKEN_TYPE  
      (package private) static int TOKEN_VARIABLE  
      private org.fife.ui.rsyntaxtextarea.TokenMap tokenMap  
      • Fields inherited from class org.fife.ui.rsyntaxtextarea.modes.PropertiesFileTokenMaker

        VALUE, YYEOF, YYINITIAL
      • Fields inherited from class org.fife.ui.rsyntaxtextarea.AbstractJFlexTokenMaker

        offsetShift, s, start
      • Fields inherited from class org.fife.ui.rsyntaxtextarea.TokenMakerBase

        currentToken, firstToken, previousToken
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addToken​(char[] array, int start, int end, int tokenType, int startOffset, boolean hyperlink)
      This method is only invoked from the super class.
      private void addTokenImpl​(char[] array, int start, int end, int tokenType, int startOffset, int parenthesisLevel)  
      protected org.fife.ui.rsyntaxtextarea.OccurrenceMarker createOccurrenceMarker()  
      boolean getMarkOccurrencesOfTokenType​(int type)  
      boolean isIdentifierChar​(int languageIndex, char ch)  
      private boolean isPropertyChar​(char ch)  
      private void tokenizeValue​(char[] array, int start, int end, int startOffset)  
      • Methods inherited from class org.fife.ui.rsyntaxtextarea.modes.PropertiesFileTokenMaker

        addToken, getLineCommentStartAndEnd, getTokenList, yybegin, yycharat, yyclose, yylength, yylex, yypushback, yyreset, yystate, yytext
      • Methods inherited from class org.fife.ui.rsyntaxtextarea.AbstractJFlexTokenMaker

        yybegin
      • Methods inherited from class org.fife.ui.rsyntaxtextarea.TokenMakerBase

        addNullToken, addToken, getClosestStandardTokenTypeForInternalType, getCurlyBracesDenoteCodeBlocks, getInsertBreakAction, getLanguageIndex, getLastTokenTypeOnLine, getNoTokensIdentifiedYet, getOccurrenceMarker, getShouldIndentNextLineAfter, isMarkupLanguage, resetTokenList, setLanguageIndex
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FlatThemeTokenMaker

        public FlatThemeTokenMaker()
    • Method Detail

      • addToken

        public void addToken​(char[] array,
                             int start,
                             int end,
                             int tokenType,
                             int startOffset,
                             boolean hyperlink)
        This method is only invoked from the super class.
        Overrides:
        addToken in class org.fife.ui.rsyntaxtextarea.TokenMakerBase
      • tokenizeValue

        private void tokenizeValue​(char[] array,
                                   int start,
                                   int end,
                                   int startOffset)
      • addTokenImpl

        private void addTokenImpl​(char[] array,
                                  int start,
                                  int end,
                                  int tokenType,
                                  int startOffset,
                                  int parenthesisLevel)
      • isPropertyChar

        private boolean isPropertyChar​(char ch)
      • createOccurrenceMarker

        protected org.fife.ui.rsyntaxtextarea.OccurrenceMarker createOccurrenceMarker()
        Overrides:
        createOccurrenceMarker in class org.fife.ui.rsyntaxtextarea.TokenMakerBase
      • getMarkOccurrencesOfTokenType

        public boolean getMarkOccurrencesOfTokenType​(int type)
        Specified by:
        getMarkOccurrencesOfTokenType in interface org.fife.ui.rsyntaxtextarea.TokenMaker
        Overrides:
        getMarkOccurrencesOfTokenType in class org.fife.ui.rsyntaxtextarea.TokenMakerBase
      • isIdentifierChar

        public boolean isIdentifierChar​(int languageIndex,
                                        char ch)
        Specified by:
        isIdentifierChar in interface org.fife.ui.rsyntaxtextarea.TokenMaker
        Overrides:
        isIdentifierChar in class org.fife.ui.rsyntaxtextarea.TokenMakerBase