Class GroovyFilter


public class GroovyFilter extends StructuredSyntaxDocumentFilter
Regex-based syntax-highlighting filter for Groovy source text.
  • Field Details

    • COMMENT

      public static final String COMMENT
      Style name used for comments.
      See Also:
    • SLASH_STAR_COMMENT

      public static final String SLASH_STAR_COMMENT
      Pattern matching block comments.
      See Also:
    • SLASH_SLASH_COMMENT

      public static final String SLASH_SLASH_COMMENT
      Pattern matching line comments.
      See Also:
    • QUOTES

      public static final String QUOTES
      Pattern matching double-quoted and triple-double-quoted strings.
      See Also:
    • SINGLE_QUOTES

      public static final String SINGLE_QUOTES
      Pattern matching single-quoted and triple-single-quoted strings.
      See Also:
    • SLASHY_QUOTES

      public static final String SLASHY_QUOTES
      Pattern matching slashy and dollar-slashy strings.
      See Also:
    • DIGIT

      public static final String DIGIT
      Style name used for numeric literals.
      See Also:
    • DECIMAL_INTEGER_LITERAL

      public static final String DECIMAL_INTEGER_LITERAL
      Pattern matching decimal integer literals.
      See Also:
    • HEX_INTEGER_LITERAL

      public static final String HEX_INTEGER_LITERAL
      Pattern matching hexadecimal integer literals.
      See Also:
    • OCTAL_INTEGER_LITERAL

      public static final String OCTAL_INTEGER_LITERAL
      Pattern matching octal integer literals.
      See Also:
    • BINARY_INTEGER_LITERAL

      public static final String BINARY_INTEGER_LITERAL
      Pattern matching binary integer literals.
      See Also:
    • DECIMAL_FLOATING_POINT_LITERAL

      public static final String DECIMAL_FLOATING_POINT_LITERAL
      Pattern matching decimal floating-point literals.
      See Also:
    • HEXADECIMAL_FLOATING_POINT_LITERAL

      public static final String HEXADECIMAL_FLOATING_POINT_LITERAL
      Pattern matching hexadecimal floating-point literals.
      See Also:
    • ANNOTATION

      public static final String ANNOTATION
      Pattern matching annotations.
      See Also:
    • IDENT

      public static final String IDENT
      Pattern matching identifiers.
      See Also:
    • OPERATION

      public static final String OPERATION
      Pattern matching method-style identifiers followed by an opening parenthesis.
      See Also:
    • LEFT_PARENS

      public static final String LEFT_PARENS
      Pattern matching left parentheses inside operation matches.
      See Also:
    • RESERVED_WORD

      public static final String RESERVED_WORD
      Style name used for reserved words.
      See Also:
    • RESERVED_WORDS

      public static final String[] RESERVED_WORDS
      Patterns matching Groovy reserved words.
  • Constructor Details

    • GroovyFilter

      public GroovyFilter(DefaultStyledDocument doc)
      Creates a new instance of GroovyFilter
      Parameters:
      doc - the document to highlight
  • Method Details

    • installAutoTabAction

      public static void installAutoTabAction(JTextComponent tComp)
      Installs the auto-indent action on the supplied text component.
      Parameters:
      tComp - the text component to configure