|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.cs.drjava.model.repl.InteractionsModel
edu.rice.cs.drjava.model.repl.RMIInteractionsModel
edu.rice.cs.drjava.model.repl.DefaultInteractionsModel
public class DefaultInteractionsModel
Interactions model which can notify GlobalModelListeners on events. TODO: remove invokeLater wrappers here and enforce the policy that all of the listener methods must use them
Field Summary | |
---|---|
protected DefaultGlobalModel |
_model
Model that contains the interpreter to use. |
Fields inherited from class edu.rice.cs.drjava.model.repl.RMIInteractionsModel |
---|
_jvm |
Fields inherited from class edu.rice.cs.drjava.model.repl.InteractionsModel |
---|
_cDoc, _document, _inputListener, _lastError, _notifier, _pane, _secondToLastError, _waitingForFirstInterpreter, _workingDirectory, _writerLock, BANNER_PREFIX |
Constructor Summary | |
---|---|
DefaultInteractionsModel(DefaultGlobalModel model,
MainJVM jvm,
ConsoleDocumentInterface cDoc,
File wd)
Creates a new InteractionsModel. |
Method Summary | |
---|---|
protected void |
_interpreterResetFailed(Throwable t)
Any extra action to perform (beyond notifying listeners) when the interpreter fails to reset. |
protected void |
_notifyInteractionEnded()
In the event thread, notifies listeners that an interaction has ended. |
protected void |
_notifyInteractionIncomplete()
In the event thread, notifies the view that the current interaction is incomplete. |
void |
_notifyInteractionStarted()
In the event thread, notifies listeners that an interaction has started. |
protected void |
_notifyInterpreterChanged(boolean inProgress)
In the event thread, notifies listeners that the interpreter has changed. |
protected void |
_notifyInterpreterExited(int status)
In the event thread, notifies listeners that the interpreter has exited unexpectedly. |
void |
_notifyInterpreterReady(File wd)
In the event thread, notifies listeners that the interpreter is ready. |
protected void |
_notifyInterpreterResetFailed(Throwable t)
In the event thread, notifies listeners that the interpreter reset failed. |
protected void |
_notifyInterpreterResetting()
In the event thread, notifies listeners that the interpreter is resetting. |
protected void |
_notifySlaveJVMUsed()
In the event thread, notifies listeners that the slave JVM has been used. |
protected void |
_notifySlaveJVMUsed(File wd)
In the event thread, notifies listeners that slave JVM has been used. |
protected void |
_notifySyntaxErrorOccurred(int offset,
int length)
In the event thread, notifies listeners that an error was present in the interaction. |
ConsoleDocument |
getConsoleDocument()
Gets the console tab document for this interactions model |
String |
getConsoleInput()
Returns a line of text entered by the user at the equivalent of System.in. |
void |
interpreterReady(File wd)
Called when the Java interpreter is ready to use. |
void |
replSystemErrPrint(String s)
Called when the repl prints to System.err. |
void |
replSystemOutPrint(String s)
Called when the repl prints to System.out. |
Methods inherited from class edu.rice.cs.drjava.model.repl.RMIInteractionsModel |
---|
_interpret, _resetInterpreter, addBuildDirectoryClassPath, addExternalFilesClassPath, addExtraClassPath, addInterpreter, addProjectClassPath, addProjectFilesClassPath, enableRestart, getClassPath, getVariableToString, getVariableType, removeInterpreter, setActiveInterpreter, setPrivateAccessible, setToDefaultInterpreter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final DefaultGlobalModel _model
Constructor Detail |
---|
public DefaultInteractionsModel(DefaultGlobalModel model, MainJVM jvm, ConsoleDocumentInterface cDoc, File wd)
model
- DefaultGlobalModel to do the interpretationjvm
- the RMI interface used by the Main JVM to access the Interpreter JVMcDoc
- documentwd
- the working directory for interactions i/oMethod Detail |
---|
public void replSystemOutPrint(String s)
replSystemOutPrint
in interface InteractionsModelCallback
replSystemOutPrint
in class InteractionsModel
s
- String to printpublic void replSystemErrPrint(String s)
replSystemErrPrint
in interface InteractionsModelCallback
replSystemErrPrint
in class InteractionsModel
s
- String to printpublic String getConsoleInput()
getConsoleInput
in interface InteractionsModelCallback
getConsoleInput
in class InteractionsModel
protected void _interpreterResetFailed(Throwable t)
_interpreterResetFailed
in class InteractionsModel
t
- The Throwable thrown by System.exitpublic void interpreterReady(File wd)
interpreterReady
in interface InteractionsModelCallback
interpreterReady
in class InteractionsModel
public void _notifyInteractionStarted()
_notifyInteractionStarted
in class InteractionsModel
protected void _notifyInteractionEnded()
_notifyInteractionEnded
in class InteractionsModel
protected void _notifySyntaxErrorOccurred(int offset, int length)
_notifySyntaxErrorOccurred
in class InteractionsModel
offset
- the first character of the error in the InteractionsDocumentlength
- the length of the error.protected void _notifyInterpreterChanged(boolean inProgress)
_notifyInterpreterChanged
in class RMIInteractionsModel
inProgress
- Whether the new interpreter is currently in progress.protected void _notifyInterpreterResetting()
_notifyInterpreterResetting
in class InteractionsModel
public void _notifyInterpreterReady(File wd)
_notifyInterpreterReady
in class InteractionsModel
protected void _notifySlaveJVMUsed(File wd)
protected void _notifyInterpreterExited(int status)
_notifyInterpreterExited
in class InteractionsModel
status
- Status code of the dead processprotected void _notifyInterpreterResetFailed(Throwable t)
_notifyInterpreterResetFailed
in class InteractionsModel
t
- Throwable causing the failureprotected void _notifyInteractionIncomplete()
_notifyInteractionIncomplete
in class InteractionsModel
protected void _notifySlaveJVMUsed()
_notifySlaveJVMUsed
in class InteractionsModel
public ConsoleDocument getConsoleDocument()
InteractionsModel
getConsoleDocument
in class InteractionsModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |