public class SmartDocumentFilter
extends DocumentFilter
The document filter based on Parrot's lexer is for highlighting the content of text editor
| Modifiers | Name | Description |
|---|---|---|
static List<Integer> |
HIGHLIGHTED_TOKEN_TYPE_LIST |
| Constructor and description |
|---|
SmartDocumentFilter(DefaultStyledDocument styledDocument) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public List<Token> |
getLatestTokenList() |
|
public Tuple2<Integer, Integer> |
getRenderRange() |
|
public void |
insertString(DocumentFilter.FilterBypass fb, int offset, String text, AttributeSet attrs) |
|
public boolean |
isLatest() |
|
public void |
remove(DocumentFilter.FilterBypass fb, int offset, int length) |
|
public void |
reparseDocument()Forces a full re-parse and re-render of the document with current styles. |
|
public void |
replace(DocumentFilter.FilterBypass fb, int offset, int length, String text, AttributeSet attrs) |
|
public void |
setRenderRange(Tuple2<Integer, Integer> renderRange) |
|
public static void |
updateStyles()Updates all SmartDocumentFilter styles with current theme colors. |
Forces a full re-parse and re-render of the document with current styles. Clears the incremental-render cache first so every token is restyled, not just the ones that differ from the last parse.
Updates all SmartDocumentFilter styles with current theme colors. Attribute values are sourced from ThemeManager so custom .theme files feed both this (ANTLR-token-driven) path and the regex-driven GroovyFilter path from one place. Called at init time and on theme switch.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.