java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.PlainDocument
alice.util.jedit.SyntaxDocument
- All Implemented Interfaces:
- javax.swing.text.Document, java.io.Serializable
- public class SyntaxDocument
- extends javax.swing.text.PlainDocument
A document implementation that can be tokenized by the syntax highlighting
system.
- Version:
- $Id: SyntaxDocument.java,v 1.14 1999/12/13 03:40:30 sp Exp $
Nested classes inherited from class javax.swing.text.AbstractDocument |
javax.swing.text.AbstractDocument.AbstractElement, javax.swing.text.AbstractDocument.AttributeContext, javax.swing.text.AbstractDocument.BranchElement, javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AbstractDocument.ElementEdit, javax.swing.text.AbstractDocument.LeafElement |
Methods inherited from class javax.swing.text.AbstractDocument |
addDocumentListener, addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, postRemoveUpdate, putProperty, readLock, readUnlock, remove, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tokenMarker
protected TokenMarker tokenMarker
SyntaxDocument
public SyntaxDocument()
getTokenMarker
public TokenMarker getTokenMarker()
- 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.
setTokenMarker
public void setTokenMarker(TokenMarker tm)
- 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.
tokenizeLines
public void tokenizeLines()
- Reparses the document, by passing all lines to the token
marker. This should be called after the document is first
loaded.
tokenizeLines
public void tokenizeLines(int start,
int len)
- 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.
beginStructEdit
public void beginStructEdit()
- Starts 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.
endStructEdit
public void endStructEdit()
- 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.
addUndoableEdit
public void addUndoableEdit(javax.swing.undo.UndoableEdit edit)
- Adds an undoable edit to this document's undo list. The edit
should be ignored if something is currently being undone.
- Since:
- jEdit 2.2pre1
fireInsertUpdate
protected void fireInsertUpdate(javax.swing.event.DocumentEvent evt)
- We overwrite this method to update the token marker
state immediately so that any event listeners get a
consistent token marker.
fireRemoveUpdate
protected void fireRemoveUpdate(javax.swing.event.DocumentEvent evt)
- We overwrite this method to update the token marker
state immediately so that any event listeners get a
consistent token marker.