Package groovy.console.ui.text
Class SmartDocumentFilter
java.lang.Object
javax.swing.text.DocumentFilter
groovy.console.ui.text.SmartDocumentFilter
The document filter based on Parrot's lexer is for highlighting the content of text editor
- Since:
- 3.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.text.DocumentFilter
DocumentFilter.FilterBypass
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionList<org.antlr.v4.runtime.Token>
void
insertString
(DocumentFilter.FilterBypass fb, int offset, String text, AttributeSet attrs) boolean
isLatest()
void
remove
(DocumentFilter.FilterBypass fb, int offset, int length) void
replace
(DocumentFilter.FilterBypass fb, int offset, int length, String text, AttributeSet attrs) void
setRenderRange
(Tuple2<Integer, Integer> renderRange)
-
Field Details
-
HIGHLIGHTED_TOKEN_TYPE_LIST
-
-
Constructor Details
-
SmartDocumentFilter
-
-
Method Details
-
insertString
public void insertString(DocumentFilter.FilterBypass fb, int offset, String text, AttributeSet attrs) throws BadLocationException - Overrides:
insertString
in classDocumentFilter
- Throws:
BadLocationException
-
remove
public void remove(DocumentFilter.FilterBypass fb, int offset, int length) throws BadLocationException - Overrides:
remove
in classDocumentFilter
- Throws:
BadLocationException
-
replace
public void replace(DocumentFilter.FilterBypass fb, int offset, int length, String text, AttributeSet attrs) throws BadLocationException - Overrides:
replace
in classDocumentFilter
- Throws:
BadLocationException
-
isLatest
public boolean isLatest() -
getLatestTokenList
-
setRenderRange
-
getRenderRange
-