Package groovy.console.ui.text
Class GroovyFilter
java.lang.Object
javax.swing.text.DocumentFilter
groovy.console.ui.text.StructuredSyntaxDocumentFilter
groovy.console.ui.text.GroovyFilter
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.MultiLineRunNested classes/interfaces inherited from class javax.swing.text.DocumentFilter
DocumentFilter.FilterBypass -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPattern matching annotations.static final StringPattern matching binary integer literals.static final StringStyle name used for comments.static final StringPattern matching decimal floating-point literals.static final StringPattern matching decimal integer literals.static final StringStyle name used for numeric literals.static final StringPattern matching hexadecimal integer literals.static final StringPattern matching hexadecimal floating-point literals.static final StringPattern matching identifiers.static final StringPattern matching left parentheses inside operation matches.static final StringPattern matching octal integer literals.static final StringPattern matching method-style identifiers followed by an opening parenthesis.static final StringPattern matching double-quoted and triple-double-quoted strings.static final StringStyle name used for reserved words.static final String[]Patterns matching Groovy reserved words.static final StringPattern matching single-quoted and triple-single-quoted strings.static final StringPattern matching line comments.static final StringPattern matching block comments.static final StringPattern matching slashy and dollar-slashy strings.Fields inherited from class groovy.console.ui.text.StructuredSyntaxDocumentFilter
lexer, mlTextRunSet, styledDocument, TAB_REPLACEMENT -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of GroovyFilter -
Method Summary
Modifier and TypeMethodDescriptionstatic voidInstalls the auto-indent action on the supplied text component.Methods inherited from class groovy.console.ui.text.StructuredSyntaxDocumentFilter
createLexerNode, getRootNode, insertString, parseDocument, remove, replace
-
Field Details
-
COMMENT
Style name used for comments.- See Also:
-
SLASH_STAR_COMMENT
Pattern matching block comments.- See Also:
-
SLASH_SLASH_COMMENT
Pattern matching line comments.- See Also:
-
QUOTES
Pattern matching double-quoted and triple-double-quoted strings.- See Also:
-
SINGLE_QUOTES
Pattern matching single-quoted and triple-single-quoted strings.- See Also:
-
SLASHY_QUOTES
Pattern matching slashy and dollar-slashy strings.- See Also:
-
DIGIT
Style name used for numeric literals.- See Also:
-
DECIMAL_INTEGER_LITERAL
Pattern matching decimal integer literals.- See Also:
-
HEX_INTEGER_LITERAL
Pattern matching hexadecimal integer literals.- See Also:
-
OCTAL_INTEGER_LITERAL
Pattern matching octal integer literals.- See Also:
-
BINARY_INTEGER_LITERAL
Pattern matching binary integer literals.- See Also:
-
DECIMAL_FLOATING_POINT_LITERAL
Pattern matching decimal floating-point literals.- See Also:
-
HEXADECIMAL_FLOATING_POINT_LITERAL
Pattern matching hexadecimal floating-point literals.- See Also:
-
ANNOTATION
Pattern matching annotations.- See Also:
-
IDENT
Pattern matching identifiers.- See Also:
-
OPERATION
Pattern matching method-style identifiers followed by an opening parenthesis.- See Also:
-
LEFT_PARENS
Pattern matching left parentheses inside operation matches.- See Also:
-
RESERVED_WORD
Style name used for reserved words.- See Also:
-
RESERVED_WORDS
Patterns matching Groovy reserved words.
-
-
Constructor Details
-
GroovyFilter
Creates a new instance of GroovyFilter- Parameters:
doc- the document to highlight
-
-
Method Details
-
installAutoTabAction
Installs the auto-indent action on the supplied text component.- Parameters:
tComp- the text component to configure
-