Package groovy.console.ui.text
Class SmartDocumentFilter
java.lang.Object
javax.swing.text.DocumentFilter
groovy.console.ui.text.SmartDocumentFilter
public class SmartDocumentFilter
extends javax.swing.text.DocumentFilter
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
javax.swing.text.DocumentFilter.FilterBypass
-
Constructor Summary
Constructors Constructor Description SmartDocumentFilter(javax.swing.text.DefaultStyledDocument styledDocument)
-
Method Summary
Modifier and Type Method Description java.util.List<org.antlr.v4.runtime.Token>
getLatestTokenList()
Tuple2<java.lang.Integer,java.lang.Integer>
getRenderRange()
void
insertString(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, java.lang.String text, javax.swing.text.AttributeSet attrs)
boolean
isLatest()
void
remove(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, int length)
void
replace(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, int length, java.lang.String text, javax.swing.text.AttributeSet attrs)
void
setRenderRange(Tuple2<java.lang.Integer,java.lang.Integer> renderRange)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SmartDocumentFilter
public SmartDocumentFilter(javax.swing.text.DefaultStyledDocument styledDocument)
-
-
Method Details
-
insertString
public void insertString(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, java.lang.String text, javax.swing.text.AttributeSet attrs) throws javax.swing.text.BadLocationException- Overrides:
insertString
in classjavax.swing.text.DocumentFilter
- Throws:
javax.swing.text.BadLocationException
-
remove
public void remove(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, int length) throws javax.swing.text.BadLocationException- Overrides:
remove
in classjavax.swing.text.DocumentFilter
- Throws:
javax.swing.text.BadLocationException
-
replace
public void replace(javax.swing.text.DocumentFilter.FilterBypass fb, int offset, int length, java.lang.String text, javax.swing.text.AttributeSet attrs) throws javax.swing.text.BadLocationException- Overrides:
replace
in classjavax.swing.text.DocumentFilter
- Throws:
javax.swing.text.BadLocationException
-
isLatest
public boolean isLatest() -
getLatestTokenList
public java.util.List<org.antlr.v4.runtime.Token> getLatestTokenList() -
setRenderRange
-
getRenderRange
-