Interface NewHighlighting

  • public interface NewHighlighting
    This builder is used to define syntax highlighting (aka code coloration) on files. Example:
         .highlight(1, 10, 1, 15, KEYWORD)
         .highlight(1, 16, 1, 18, STRING)
         // Add more highlight if needed
    • Method Detail

      • highlight

        NewHighlighting highlight​(int startOffset,
                                  int endOffset,
                                  TypeOfText typeOfText)
        since 5.6 Only supported to ease migration from old API. Please prefer other highlight() methods.
        Call this method to indicate the type of text in a range.
        startOffset - Starting position in file for this type of text. Beginning of a file starts with offset '0'.
        endOffset - End position in file for this type of text.
        typeOfText - see TypeOfText values.
      • save

        void save()
        Call this method only once when your are done with defining highlighting of the file. It is not supported to save highlighting twice for the same file.
        java.lang.IllegalStateException - if you have defined overlapping highlighting