org.netbeans.modules.editor.structure.api |
|
Java Source File Name | Type | Comment |
DocumentElement.java | Class | DocumentElement is a building block of the document model tree-based hierarchy.
DocumentElement represents a piece of a
javax.swing.text.Document with following behaviour
- DocumentElement can contain other elements (elements can nest),
- Boundaries of each two elements cannot cross,
- Two elements cannot have the same boundaries.
- DocumentElement boundaries cannot be the same (startoffset==endoffset)
The DocumentElement holds a set of attributes which can contain an arbitrary metadata related to the element.
It is possible to attach a
DocumentElementListener to each DocumentElement.
The listener can notify about children elements added, removed, reordered or when the content or attributes of the element have been changed.
Each DocumentModel which contains a tree of elements has one root element. |
DocumentElementEvent.java | Class | This is an implementation of EventObject class holding an information
about a change in an DocumentElement. |
DocumentElementListener.java | Interface | An implementation of EventListener allowing to listen o changes of a DocumentElement. |
DocumentModel.java | Class | DocumentModel represents a hirarchical structure of a
javax.swing.text.Document .
It consists of a tree of DocumentElement objects which represents a various
pieces of the document.
The model content is created by an implementation of the SPI class
DocumentModelProvider responsible for parsing the text document a producing
appropriate DocumentElement-s.
For more information about how to create an implementation of the DocumentModelProvider
and how to register to a specific file-type look into
org.netbeans.modules.editor.spi.DocumentModelProvider documentation.
There can be only one instance of the model associated to a document
instance at the time. |
DocumentModelException.java | Class | DocumentModelException is thrown from the DocumentModel's methods. |
DocumentModelListener.java | Interface | An implementation of EventListener allowing to listen o changes of the DocumentModel. |
DocumentModelStateListener.java | Interface | Implementations of this interface may register itself into the DocumentModel
and then listen to changes of the model state.
Allows to listen on following changes of the model state:
- The underlaying document has changed.
- DocumentModel started to scan the underlying document for changes.
|
DocumentModelTest.java | Class | |
DocumentModelUtils.java | Class | An utilitity class containing various methods simplifying work with the DocumentElements. |