public class SyntaxDocument extends javax.swing.text.PlainDocument
A document implementation that can be tokenized by the syntax highlighting system.
Fields inherited from class | Fields |
---|---|
class javax.swing.text.PlainDocument |
tabSizeAttribute, lineLimitAttribute, ParagraphElementName, ContentElementName, SectionElementName, BidiElementName, ElementNameAttribute, StreamDescriptionProperty, TitleProperty |
Type Params | Return Type | Name and description |
---|---|---|
|
public void |
addUndoableEdit(javax.swing.undo.UndoableEdit edit) Adds an undoable edit to this document's undo list. |
|
public void |
beginCompoundEdit() Starts a compound edit that can be undone in one operation. |
|
public void |
endCompoundEdit() Ends a compound edit that can be undone in one operation. |
|
public TokenMarker |
getTokenMarker() Returns the token marker that is to be used to split lines of this document up into tokens. |
|
public void |
setTokenMarker(TokenMarker tm) Sets the token marker that is to be used to split lines of this document up into tokens. |
|
public void |
tokenizeLines() Reparses the document, by passing all lines to the token marker. |
|
public void |
tokenizeLines(int start, int len) Reparses the document, by passing the specified lines to the token marker. |
Methods inherited from class | Name |
---|---|
class javax.swing.text.PlainDocument |
javax.swing.text.PlainDocument#getParagraphElement(int), javax.swing.text.PlainDocument#insertString(int, java.lang.String, javax.swing.text.AttributeSet), javax.swing.text.PlainDocument#getDefaultRootElement(), javax.swing.text.PlainDocument#readUnlock(), javax.swing.text.PlainDocument#getDocumentProperties(), javax.swing.text.PlainDocument#getDocumentFilter(), javax.swing.text.PlainDocument#getBidiRootElement(), javax.swing.text.PlainDocument#setDocumentProperties(java.util.Dictionary), javax.swing.text.PlainDocument#getAsynchronousLoadPriority(), javax.swing.text.PlainDocument#setAsynchronousLoadPriority(int), javax.swing.text.PlainDocument#setDocumentFilter(javax.swing.text.DocumentFilter), javax.swing.text.PlainDocument#getDocumentListeners(), javax.swing.text.PlainDocument#getUndoableEditListeners(), javax.swing.text.PlainDocument#addDocumentListener(javax.swing.event.DocumentListener), javax.swing.text.PlainDocument#removeDocumentListener(javax.swing.event.DocumentListener), javax.swing.text.PlainDocument#addUndoableEditListener(javax.swing.event.UndoableEditListener), javax.swing.text.PlainDocument#removeUndoableEditListener(javax.swing.event.UndoableEditListener), javax.swing.text.PlainDocument#putProperty(java.lang.Object, java.lang.Object), javax.swing.text.PlainDocument#getStartPosition(), javax.swing.text.PlainDocument#getEndPosition(), javax.swing.text.PlainDocument#createPosition(int), javax.swing.text.PlainDocument#getRootElements(), javax.swing.text.PlainDocument#remove(int, int), javax.swing.text.PlainDocument#getProperty(java.lang.Object), javax.swing.text.PlainDocument#getLength(), javax.swing.text.PlainDocument#replace(int, int, java.lang.String, javax.swing.text.AttributeSet), javax.swing.text.PlainDocument#getText(int, int), javax.swing.text.PlainDocument#getText(int, int, javax.swing.text.Segment), javax.swing.text.PlainDocument#readLock(), javax.swing.text.PlainDocument#render(java.lang.Runnable), javax.swing.text.PlainDocument#getListeners(java.lang.Class), javax.swing.text.PlainDocument#dump(java.io.PrintStream), javax.swing.text.PlainDocument#wait(long, int), javax.swing.text.PlainDocument#wait(), javax.swing.text.PlainDocument#wait(long), javax.swing.text.PlainDocument#equals(java.lang.Object), javax.swing.text.PlainDocument#toString(), javax.swing.text.PlainDocument#hashCode(), javax.swing.text.PlainDocument#getClass(), javax.swing.text.PlainDocument#notify(), javax.swing.text.PlainDocument#notifyAll() |
Adds an undoable edit to this document's undo list. The edit should be ignored if something is currently being undone.
edit
- The undoable editStarts a compound edit that can be undone in one operation. Subclasses that implement undo should override this method; this class has no undo functionality so this method is empty.
Ends a compound edit that can be undone in one operation. Subclasses that implement undo should override this method; this class has no undo functionality so this method is empty.
Returns the token marker that is to be used to split lines of this document up into tokens. May return null if this document is not to be colorized.
Sets the token marker that is to be used to split lines of this document up into tokens. May throw an exception if this is not supported for this type of document.
tm
- The new token markerReparses the document, by passing all lines to the token marker. This should be called after the document is first loaded.
Reparses the document, by passing the specified lines to the token marker. This should be called after a large quantity of text is first inserted.
start
- The first line to parselen
- The number of lines, after the first one to parse