Class ScriptStylerProvider

java.lang.Object
qupath.lib.gui.scripting.richtextfx.stylers.ScriptStylerProvider

public class ScriptStylerProvider extends Object
Class with static methods to fetch all the available ScriptStylers.
Since:
v0.4.0
Author:
Melvin Gelbard
  • Field Details

    • PLAIN

      public static final ScriptStyler PLAIN
      Plain styler (no highlighting)
    • MARKDOWN

      public static final ScriptStyler MARKDOWN
      Styler for markdown
    • GROOVY

      public static final ScriptStyler GROOVY
      Styler for Groovy
    • JAVA

      public static final ScriptStyler JAVA
      Styler for Java
    • JSON

      public static final ScriptStyler JSON
      Styler for JSON
    • PROPERTIES

      public static final ScriptStyler PROPERTIES
      Styler for Java properties files
    • PYTHON

      public static final ScriptStyler PYTHON
      Styler for Python
    • XML

      public static final ScriptStyler XML
      Styler for XML
    • YAML

      public static final ScriptStyler YAML
      Styler for YAML
  • Constructor Details

    • ScriptStylerProvider

      public ScriptStylerProvider()
  • Method Details

    • getStylerFromLanguage

      public static ScriptStyler getStylerFromLanguage(ScriptLanguage language)
      Get the ScriptStyler object corresponding to the specified ScriptLanguage. If the language cannot be matched, PlainStyler is returned.
      Parameters:
      language -
      Returns:
      corresponding stylers, or PlainStyler if no match.
    • getPlainStyling

      public static org.fxmisc.richtext.model.StyleSpans<Collection<String>> getPlainStyling(String text)
      Get simple styling that does not apply any classes.
      Parameters:
      text - the text to process styling for
      Returns:
    • getLogStyling

      public static org.fxmisc.richtext.model.StyleSpans<Collection<String>> getLogStyling(String text)
      Get styling for use with a logger.
      Parameters:
      text - the text to process styling for
      Returns: