Class SyntaxHighlighter

java.lang.Object
org.jline.builtins.SyntaxHighlighter

public class SyntaxHighlighter extends Object
Java implementation of nanorc highlighter
Author:
Matti Rinta-Nikkola
  • Field Details

  • Method Details

    • build

      protected static SyntaxHighlighter build(List<Path> syntaxFiles, String file, String syntaxName)
    • build

      protected static SyntaxHighlighter build(List<Path> syntaxFiles, String file, String syntaxName, boolean ignoreErrors)
    • build

      public static SyntaxHighlighter build(Path nanorc, String syntaxName)
      Build SyntaxHighlighter
      Parameters:
      nanorc - Path of nano config file jnanorc
      syntaxName - syntax name e.g 'Java'
      Returns:
      SyntaxHighlighter
    • nanorcInclude

      protected static void nanorcInclude(String parameter, List<Path> syntaxFiles) throws IOException
      Throws:
      IOException
    • nanorcTheme

      protected static void nanorcTheme(String parameter, List<Path> syntaxFiles) throws IOException
      Throws:
      IOException
    • addFiles

      protected static void addFiles(String parameter, Consumer<Stream<Path>> consumer) throws IOException
      Throws:
      IOException
    • build

      public static SyntaxHighlighter build(String nanorcUrl)
      Build SyntaxHighlighter
      Parameters:
      nanorcUrl - Url of nanorc file
      Returns:
      SyntaxHighlighter
    • setCurrentTheme

      public void setCurrentTheme(Path currentTheme)
    • getCurrentTheme

      public Path getCurrentTheme()
    • setParser

      public void setParser(org.jline.builtins.SyntaxHighlighter.Parser parser)
    • reset

      public SyntaxHighlighter reset()
    • refresh

      public void refresh()
    • highlight

      public org.jline.utils.AttributedString highlight(String string)
    • highlight

      public org.jline.utils.AttributedString highlight(org.jline.utils.AttributedStringBuilder asb)
    • highlight

      public org.jline.utils.AttributedString highlight(org.jline.utils.AttributedString attributedString)