public class REPLConsole extends DefaultStyledDocument
DefaultStyledDocument.AttributeUndoableEdit, DefaultStyledDocument.ElementBuffer, DefaultStyledDocument.ElementSpec, DefaultStyledDocument.SectionElement
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement
Modifier and Type | Field and Description |
---|---|
private LispObject |
debuggerHook |
private boolean |
disposed |
private StringBuffer |
inputBuffer |
private Reader |
reader |
private Thread |
replThread |
private Writer |
writer |
buffer, BUFFER_SIZE_DEFAULT
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
StreamDescriptionProperty, TitleProperty
Constructor and Description |
---|
REPLConsole(LispObject replFunction) |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
void |
disposeOnClose(Window parent) |
Reader |
getReader() |
Writer |
getWriter() |
void |
insertString(int offs,
String str,
AttributeSet a) |
static void |
main(String[] args) |
LispObject |
makeReplWrapper(Stream in,
Stream out,
LispObject fn) |
protected boolean |
processInputP(StringBuffer sb,
String str)
Guaranteed to run with exclusive access to the buffer.
|
void |
remove(int offs,
int len) |
void |
setupTextComponent(JTextComponent txt) |
protected void |
superInsertString(int offs,
String str,
AttributeSet a) |
addDocumentListener, addStyle, create, createDefaultRoot, getBackground, getCharacterElement, getDefaultRootElement, getFont, getForeground, getLogicalStyle, getParagraphElement, getStyle, getStyleNames, insert, insertUpdate, removeDocumentListener, removeElement, removeStyle, removeUpdate, setCharacterAttributes, setLogicalStyle, setParagraphAttributes, styleChanged
addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addUndoableEditListener, createPosition, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, putProperty, removeUndoableEditListener, render
private StringBuffer inputBuffer
private Reader reader
private Writer writer
private boolean disposed
private final Thread replThread
private final LispObject debuggerHook
public REPLConsole(LispObject replFunction)
public void insertString(int offs, String str, AttributeSet a) throws BadLocationException
insertString
in interface Document
insertString
in class AbstractDocument
BadLocationException
protected void superInsertString(int offs, String str, AttributeSet a) throws BadLocationException
BadLocationException
protected boolean processInputP(StringBuffer sb, String str)
sb
- NB sb MUST NOT be destructively modified!!public void remove(int offs, int len) throws BadLocationException
remove
in interface Document
remove
in class AbstractDocument
BadLocationException
public Reader getReader()
public Writer getWriter()
public void setupTextComponent(JTextComponent txt)
public void dispose()
public LispObject makeReplWrapper(Stream in, Stream out, LispObject fn)
public void disposeOnClose(Window parent)
public static void main(String[] args)