Class ScriptLanguage

java.lang.Object
qupath.lib.scripting.languages.ScriptLanguage
Direct Known Subclasses:
CssLanguage, DefaultScriptLanguage, JsonLanguage, MarkdownLanguage, PlainLanguage, PropertiesLanguage, XmlLanguage, YamlLanguage

public abstract class ScriptLanguage extends Object
Abstract class to represent languages supported by the script editor.
Since:
v0.4.0
Author:
Melvin Gelbard, Pete Bankhead
  • Constructor Details

    • ScriptLanguage

      protected ScriptLanguage(String name, Collection<String> exts)
      Default constructor for a ScriptLanguage.
      Parameters:
      name - the language name
      exts - all supported file extensions for this language, in the form .ext (lowercase)
    • ScriptLanguage

      protected ScriptLanguage(String name, String ext)
      Default constructor for a ScriptLanguage.
      Parameters:
      name - the language name
      ext - the file extensions for this language, in the form .ext (lowercase)
  • Method Details

    • getName

      public String getName()
      Get the name of this language
      Returns:
      name
    • getExtensions

      public Set<String> getExtensions()
      Get an unmodifiable set containing the possible extensions for this language.
      Returns:
      extension array
    • getAutoCompletor

      public ScriptAutoCompletor getAutoCompletor()
      Get the ScriptAutoCompletor object that takes care of this language's auto-completion.

      Can return null if the script editor should not handle auto-completion for this language.

      Returns:
      auto-completor
    • toString

      public String toString()
      Overrides:
      toString in class Object