Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Modifiers | Name | Description |
---|---|---|
class |
StructuredSyntaxDocumentFilter.LexerNode |
|
protected class |
StructuredSyntaxDocumentFilter.MultiLineRun |
Modifiers | Name | Description |
---|---|---|
static String |
TAB_REPLACEMENT |
|
protected StructuredSyntaxDocumentFilter.LexerNode |
lexer |
The root of the lexical parsing tree. |
protected SortedSet |
mlTextRunSet |
The position tree of multi-line comments. |
protected DefaultStyledDocument |
styledDocument |
Constructor and description |
---|
StructuredSyntaxDocumentFilter
(DefaultStyledDocument document) Creates a new instance of StructuredSyntaxDocumentFilter |
Type | Name and description |
---|---|
StructuredSyntaxDocumentFilter.LexerNode |
createLexerNode() Create a new LexerNode for adding to root. |
StructuredSyntaxDocumentFilter.LexerNode |
getRootNode() Get the root node for lexing the document. |
void |
insertString(DocumentFilter.FilterBypass fb, int offset, String text, AttributeSet attrs) Insert a string into the document, and then parse it if the parser has been set. |
protected void |
parseDocument(int offset, int length) Parse the Document to update the character styles given an initial start position. |
void |
remove(DocumentFilter.FilterBypass fb, int offset, int length) Remove a string from the document, and then parse it if the parser has been set. |
void |
replace(DocumentFilter.FilterBypass fb, int offset, int length, String text, AttributeSet attrs) Replace a string in the document, and then parse it if the parser has been set. |
The root of the lexical parsing tree.
The position tree of multi-line comments.
Creates a new instance of StructuredSyntaxDocumentFilter
document
- the styled document to parseCreate a new LexerNode for adding to root.
Get the root node for lexing the document. Children can be added such that matching patterns can be further parsed if required.
Insert a string into the document, and then parse it if the parser has been set.
Parse the Document to update the character styles given an initial start position. Called by the filter after it has updated the text.
Remove a string from the document, and then parse it if the parser has been set.
Replace a string in the document, and then parse it if the parser has been set.
Copyright © 2003-2015 The Apache Software Foundation. All rights reserved.