Package groovy.console.ui.text

# Class GroovyFilter

java.lang.Object
javax.swing.text.DocumentFilter
groovy.console.ui.text.StructuredSyntaxDocumentFilter
groovy.console.ui.text.GroovyFilter

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

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class groovy.console.ui.text.StructuredSyntaxDocumentFilter

  `StructuredSyntaxDocumentFilter.LexerNode, StructuredSyntaxDocumentFilter.MultiLineRun`

  ## Nested classes/interfaces inherited from class javax.swing.text.DocumentFilter

  `DocumentFilter.FilterBypass`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `ANNOTATION`
  Pattern matching annotations.
  `static final String`
  `BINARY_INTEGER_LITERAL`
  Pattern matching binary integer literals.
  `static final String`
  `COMMENT`
  Style name used for comments.
  `static final String`
  `DECIMAL_FLOATING_POINT_LITERAL`
  Pattern matching decimal floating-point literals.
  `static final String`
  `DECIMAL_INTEGER_LITERAL`
  Pattern matching decimal integer literals.
  `static final String`
  `DIGIT`
  Style name used for numeric literals.
  `static final String`
  `HEX_INTEGER_LITERAL`
  Pattern matching hexadecimal integer literals.
  `static final String`
  `HEXADECIMAL_FLOATING_POINT_LITERAL`
  Pattern matching hexadecimal floating-point literals.
  `static final String`
  `IDENT`
  Pattern matching identifiers.
  `static final String`
  `LEFT_PARENS`
  Pattern matching left parentheses inside operation matches.
  `static final String`
  `OCTAL_INTEGER_LITERAL`
  Pattern matching octal integer literals.
  `static final String`
  `OPERATION`
  Pattern matching method-style identifiers followed by an opening parenthesis.
  `static final String`
  `QUOTES`
  Pattern matching double-quoted and triple-double-quoted strings.
  `static final String`
  `RESERVED_WORD`
  Style name used for reserved words.
  `static final String[]`
  `RESERVED_WORDS`
  Patterns matching Groovy reserved words.
  `static final String`
  `SINGLE_QUOTES`
  Pattern matching single-quoted and triple-single-quoted strings.
  `static final String`
  `SLASH_SLASH_COMMENT`
  Pattern matching line comments.
  `static final String`
  `SLASH_STAR_COMMENT`
  Pattern matching block comments.
  `static final String`
  `SLASHY_QUOTES`
  Pattern matching slashy and dollar-slashy strings.

  ### Fields inherited from class groovy.console.ui.text.StructuredSyntaxDocumentFilter

  `lexer, mlTextRunSet, styledDocument, TAB_REPLACEMENT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GroovyFilter(DefaultStyledDocument doc)`
  Creates a new instance of GroovyFilter

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `installAutoTabAction(JTextComponent tComp)`
  Installs the auto-indent action on the supplied text component.

  ### Methods inherited from class groovy.console.ui.text.StructuredSyntaxDocumentFilter

  `createLexerNode, getRootNode, insertString, parseDocument, remove, replace`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### COMMENT

    public static final String COMMENT
    Style name used for comments.
    See Also:
      - Constant Field Values

  - ### SLASH_STAR_COMMENT

    public static final String SLASH_STAR_COMMENT
    Pattern matching block comments.
    See Also:
      - Constant Field Values

  - ### SLASH_SLASH_COMMENT

    public static final String SLASH_SLASH_COMMENT
    Pattern matching line comments.
    See Also:
      - Constant Field Values

  - ### QUOTES

    public static final String QUOTES
    Pattern matching double-quoted and triple-double-quoted strings.
    See Also:
      - Constant Field Values

  - ### SINGLE_QUOTES

    public static final String SINGLE_QUOTES
    Pattern matching single-quoted and triple-single-quoted strings.
    See Also:
      - Constant Field Values

  - ### SLASHY_QUOTES

    public static final String SLASHY_QUOTES
    Pattern matching slashy and dollar-slashy strings.
    See Also:
      - Constant Field Values

  - ### DIGIT

    public static final String DIGIT
    Style name used for numeric literals.
    See Also:
      - Constant Field Values

  - ### DECIMAL_INTEGER_LITERAL

    public static final String DECIMAL_INTEGER_LITERAL
    Pattern matching decimal integer literals.
    See Also:
      - Constant Field Values

  - ### HEX_INTEGER_LITERAL

    public static final String HEX_INTEGER_LITERAL
    Pattern matching hexadecimal integer literals.
    See Also:
      - Constant Field Values

  - ### OCTAL_INTEGER_LITERAL

    public static final String OCTAL_INTEGER_LITERAL
    Pattern matching octal integer literals.
    See Also:
      - Constant Field Values

  - ### BINARY_INTEGER_LITERAL

    public static final String BINARY_INTEGER_LITERAL
    Pattern matching binary integer literals.
    See Also:
      - Constant Field Values

  - ### DECIMAL_FLOATING_POINT_LITERAL

    public static final String DECIMAL_FLOATING_POINT_LITERAL
    Pattern matching decimal floating-point literals.
    See Also:
      - Constant Field Values

  - ### HEXADECIMAL_FLOATING_POINT_LITERAL

    public static final String HEXADECIMAL_FLOATING_POINT_LITERAL
    Pattern matching hexadecimal floating-point literals.
    See Also:
      - Constant Field Values

  - ### ANNOTATION

    public static final String ANNOTATION
    Pattern matching annotations.
    See Also:
      - Constant Field Values

  - ### IDENT

    public static final String IDENT
    Pattern matching identifiers.
    See Also:
      - Constant Field Values

  - ### OPERATION

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

  - ### LEFT_PARENS

    public static final String LEFT_PARENS
    Pattern matching left parentheses inside operation matches.
    See Also:
      - Constant Field Values

  - ### RESERVED_WORD

    public static final String RESERVED_WORD
    Style name used for reserved words.
    See Also:
      - Constant Field Values

  - ### 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