|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.text.AbstractDocument | +--javax.swing.text.DefaultStyledDocument | +--edu.rice.cs.drjava.model.repl.InteractionsDocument
The document that handles input to the repl and the interpretation of said input.
Inner Class Summary | |
private class |
InteractionsDocument.ExceptionButtonListener
|
Field Summary | |
private int |
_frozenPos
Index in the document of the first place that is editable. |
private History |
_history
Command-line history. |
private boolean |
_inProgress
|
static String |
BANNER
|
static String |
PROMPT
|
Fields inherited from class javax.swing.text.DefaultStyledDocument |
buffer, BUFFER_SIZE_DEFAULT, listeningStyles, styleChangeListener, styleContextChangeListener |
Fields inherited from class javax.swing.text.AbstractDocument |
AsyncLoadPriority, BAD_LOCATION, BAD_LOCK_STATE, BidiElementName, bidiRoot, ContentElementName, context, currWriter, data, defaultI18NProperty, documentProperties, ElementNameAttribute, I18NProperty, listenerList, numReaders, ParagraphElementName, SectionElementName |
Fields inherited from interface javax.swing.text.Document |
StreamDescriptionProperty, TitleProperty |
Constructor Summary | |
InteractionsDocument()
put your documentation comment here |
Method Summary | |
private void |
_clearCurrentInteractionText()
|
private void |
_replaceCurrentLineFromHistory()
Replaces any text entered past the prompt with the current item in the history. |
void |
addToHistory(String text)
|
void |
appendExceptionResult(String exceptionClass,
String message,
String stackTrace,
AttributeSet set)
|
void |
clearCurrentInteraction()
Clears the current interaction text and then moves to the end of the command history. |
void |
clearHistory()
Clears the history |
String |
getCurrentInteraction()
|
int |
getFrozenPos()
Returns the first location in the document where editing is allowed. |
String |
getHistoryAsString()
|
boolean |
hasHistoryNext()
put your documentation comment here |
boolean |
hasHistoryPrevious()
put your documentation comment here |
boolean |
inProgress()
|
void |
insertBeforeLastPrompt(String s,
AttributeSet a)
|
void |
insertString(int offs,
String str,
AttributeSet a)
Override superclass insertion to prevent insertion past frozen point. |
void |
moveHistoryNext()
put your documentation comment here |
void |
moveHistoryPrevious()
put your documentation comment here |
void |
prompt()
|
void |
remove(int offs,
int len)
Override superclass deletion to prevent deletion past frozen point. |
void |
reset()
Clear the UI. |
void |
saveHistory(FileSaveSelector selector)
|
void |
setInProgress(boolean b)
|
Methods inherited from class java.lang.Object |
|
Methods inherited from interface javax.swing.text.Document |
addUndoableEditListener, createPosition, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, putProperty, removeUndoableEditListener, render |
Field Detail |
public static final String BANNER
public static final String PROMPT
private boolean _inProgress
private int _frozenPos
private History _history
Constructor Detail |
public InteractionsDocument()
Method Detail |
public int getFrozenPos()
public void insertString(int offs, String str, AttributeSet a) throws BadLocationException
insertString
in class AbstractDocument
BadLocationException
- public void setInProgress(boolean b)
public boolean inProgress()
public void insertBeforeLastPrompt(String s, AttributeSet a)
public void remove(int offs, int len) throws BadLocationException
remove
in class AbstractDocument
BadLocationException
- public void reset()
public void prompt()
public void clearHistory()
public void moveHistoryPrevious()
public void moveHistoryNext()
public String getCurrentInteraction()
public void clearCurrentInteraction()
private void _clearCurrentInteractionText()
private void _replaceCurrentLineFromHistory()
public boolean hasHistoryPrevious()
public boolean hasHistoryNext()
public void addToHistory(String text)
public void appendExceptionResult(String exceptionClass, String message, String stackTrace, AttributeSet set)
public void saveHistory(FileSaveSelector selector) throws IOException
public String getHistoryAsString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |