Package editor.plugin.typeloader.java
Class JavaDocument
- java.lang.Object
-
- javax.swing.text.AbstractDocument
-
- javax.swing.text.DefaultStyledDocument
-
- editor.plugin.typeloader.java.JavaDocument
-
- All Implemented Interfaces:
Serializable,Document,StyledDocument
public class JavaDocument extends DefaultStyledDocument
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.text.DefaultStyledDocument
DefaultStyledDocument.AttributeUndoableEdit, DefaultStyledDocument.ElementBuffer, DefaultStyledDocument.ElementSpec, DefaultStyledDocument.SectionElement
-
Nested classes/interfaces inherited from class javax.swing.text.AbstractDocument
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement
-
-
Field Summary
-
Fields inherited from class javax.swing.text.DefaultStyledDocument
buffer, BUFFER_SIZE_DEFAULT
-
Fields inherited from class javax.swing.text.AbstractDocument
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
-
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
-
-
Constructor Summary
Constructors Constructor Description JavaDocument()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringaddMatchingBrace(int offset)protected StringaddMatchingQuotationMark()protected StringaddParenthesis()protected StringaddWhiteSpace(int offset)StringfindErrorMessage(int iPos)protected voidfireInsertUpdate(DocumentEvent evt)protected voidfireRemoveUpdate(DocumentEvent evt)protected StringgetEndDelimiter()DiagnosticCollector<JavaFileObject>getErrorHandler()protected StringgetSingleLineDelimiter()protected StringgetStartDelimiter()voidinsertString(int offset, String str, AttributeSet a)Override to apply syntax highlighting after the document has been updatedprotected booleanisCharQuoteDelimiter(String character)protected booleanisDelimiter(String character)protected booleanisKeyword(String token)protected booleanisQuoteDelimiter(String character)voidremove(int offset, int length)voidsetErrorHandler(DiagnosticCollector<JavaFileObject> errorHandler)-
Methods inherited from class javax.swing.text.DefaultStyledDocument
addDocumentListener, addStyle, create, createDefaultRoot, getBackground, getCharacterElement, getDefaultRootElement, getFont, getForeground, getLogicalStyle, getParagraphElement, getStyle, getStyleNames, insert, insertUpdate, removeDocumentListener, removeElement, removeStyle, removeUpdate, setCharacterAttributes, setLogicalStyle, setParagraphAttributes, styleChanged
-
Methods inherited from class javax.swing.text.AbstractDocument
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, 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
-
Methods inherited from interface javax.swing.text.Document
addUndoableEditListener, createPosition, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, putProperty, removeUndoableEditListener, render
-
-
-
-
Method Detail
-
insertString
public void insertString(int offset, String str, AttributeSet a) throws BadLocationExceptionOverride to apply syntax highlighting after the document has been updated- Specified by:
insertStringin interfaceDocument- Overrides:
insertStringin classAbstractDocument- Throws:
BadLocationException
-
remove
public void remove(int offset, int length) throws BadLocationException- Specified by:
removein interfaceDocument- Overrides:
removein classAbstractDocument- Throws:
BadLocationException
-
fireInsertUpdate
protected void fireInsertUpdate(DocumentEvent evt)
- Overrides:
fireInsertUpdatein classAbstractDocument
-
fireRemoveUpdate
protected void fireRemoveUpdate(DocumentEvent evt)
- Overrides:
fireRemoveUpdatein classAbstractDocument
-
isDelimiter
protected boolean isDelimiter(String character)
-
isQuoteDelimiter
protected boolean isQuoteDelimiter(String character)
-
isCharQuoteDelimiter
protected boolean isCharQuoteDelimiter(String character)
-
isKeyword
protected boolean isKeyword(String token)
-
getStartDelimiter
protected String getStartDelimiter()
-
getEndDelimiter
protected String getEndDelimiter()
-
getSingleLineDelimiter
protected String getSingleLineDelimiter()
-
addMatchingQuotationMark
protected String addMatchingQuotationMark() throws BadLocationException
- Throws:
BadLocationException
-
addMatchingBrace
protected String addMatchingBrace(int offset) throws BadLocationException
- Throws:
BadLocationException
-
addWhiteSpace
protected String addWhiteSpace(int offset) throws BadLocationException
- Throws:
BadLocationException
-
addParenthesis
protected String addParenthesis() throws BadLocationException
- Throws:
BadLocationException
-
getErrorHandler
public DiagnosticCollector<JavaFileObject> getErrorHandler()
-
setErrorHandler
public void setErrorHandler(DiagnosticCollector<JavaFileObject> errorHandler)
-
findErrorMessage
public String findErrorMessage(int iPos)
-
-