|
||||||||||
| 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.SimpleInteractionsModel
public class SimpleInteractionsModel
A simple implementation of InteractionsModel, which uses a DynamicJavaAdapter directly (in the same JVM) to interpret code. It can be used in a standalone interface, such as edu.rice.cs.drjava.ui.SimpleInteractionsWindow.
| Field Summary | |
|---|---|
protected ClassPathManager |
_classPathManager
|
protected edu.rice.cs.dynamicjava.interpreter.Interpreter |
_interpreter
|
| 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 | |
|---|---|
SimpleInteractionsModel()
Creates a new InteractionsModel using a InteractionsDJDocument. |
|
SimpleInteractionsModel(InteractionsDJDocument document)
Creates a new InteractionsModel with the given document adapter. |
|
| Method Summary | |
|---|---|
protected void |
_interpret(String toEval)
Interprets the given command. |
protected void |
_interpreterResetFailed(Throwable t)
Any extra action to perform (beyond notifying listeners) when the interpreter fails to reset. |
protected void |
_notifyInteractionEnded()
Notifies listeners that an interaction has ended. |
protected void |
_notifyInteractionIncomplete()
Notifies listeners that the interperaction was incomplete. |
void |
_notifyInteractionStarted()
Notifies listeners that an interaction has started. |
protected void |
_notifyInterpreterExited(int status)
Notifies listeners that the interpreter has exited unexpectedly. |
void |
_notifyInterpreterReady(File wd)
Notifies listeners that the interpreter is ready. |
protected void |
_notifyInterpreterResetFailed(Throwable t)
Notifies listeners that the interpreter reset failed. |
protected void |
_notifyInterpreterResetting()
Notifies listeners that the interpreter is resetting. |
protected void |
_notifySlaveJVMUsed()
Notifies listeners that the slave JVM has been used. |
protected void |
_notifySyntaxErrorOccurred(int offset,
int length)
Notifies listeners that an interaction contained a syntax error. |
protected void |
_resetInterpreter(File wd)
Resets the Java interpreter. |
void |
addBuildDirectoryClassPath(File path)
Adds the given path to the interpreter's classpath. |
void |
addExternalFilesClassPath(File path)
Adds the given path to the interpreter's classpath. |
void |
addExtraClassPath(File path)
Adds the given path to the interpreter's classpath. |
void |
addProjectClassPath(File path)
Adds the given path to the interpreter's classpath. |
void |
addProjectFilesClassPath(File path)
Adds the given path to the interpreter's classpath. |
ConsoleDocument |
getConsoleDocument()
Returns null because console tab document is not supported in this model |
String |
getVariableToString(String var)
Gets the string representation of the value of a variable in the current interpreter. |
String |
getVariableType(String var)
Gets the class name of a variable in the current interpreter. |
void |
setInterpreterPrivateAccessible(boolean accessible)
Sets whether protected and private variables and methods can be accessed from within the interpreter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ClassPathManager _classPathManager
protected edu.rice.cs.dynamicjava.interpreter.Interpreter _interpreter
| Constructor Detail |
|---|
public SimpleInteractionsModel()
public SimpleInteractionsModel(InteractionsDJDocument document)
document - Toolkit-independent document adapter| Method Detail |
|---|
protected void _interpret(String toEval)
_interpret in class InteractionsModeltoEval - command to be evaluatedpublic String getVariableToString(String var)
getVariableToString in class InteractionsModelvar - the name of the variable
null if the variable is not defined.public String getVariableType(String var)
getVariableType in class InteractionsModelvar - the name of the variablepublic void addProjectClassPath(File path)
addProjectClassPath in class InteractionsModelpath - Path to addpublic void addBuildDirectoryClassPath(File path)
addBuildDirectoryClassPath in class InteractionsModelpath - Path to addpublic void addProjectFilesClassPath(File path)
addProjectFilesClassPath in class InteractionsModelpath - Path to addpublic void addExternalFilesClassPath(File path)
addExternalFilesClassPath in class InteractionsModelpath - Path to addpublic void addExtraClassPath(File path)
addExtraClassPath in class InteractionsModelpath - Path to addpublic void setInterpreterPrivateAccessible(boolean accessible)
protected void _interpreterResetFailed(Throwable t)
_interpreterResetFailed in class InteractionsModelt - The Throwable thrown by System.exitprotected void _resetInterpreter(File wd)
_resetInterpreter in class InteractionsModelpublic void _notifyInteractionStarted()
_notifyInteractionStarted in class InteractionsModelprotected void _notifyInteractionEnded()
_notifyInteractionEnded in class InteractionsModel
protected void _notifySyntaxErrorOccurred(int offset,
int length)
_notifySyntaxErrorOccurred in class InteractionsModeloffset - the first character of the error in the InteractionsDocumentlength - the length of the error.protected void _notifyInterpreterResetting()
_notifyInterpreterResetting in class InteractionsModelpublic void _notifyInterpreterReady(File wd)
_notifyInterpreterReady in class InteractionsModelprotected void _notifyInterpreterExited(int status)
_notifyInterpreterExited in class InteractionsModelstatus - Status code of the dead processprotected void _notifyInterpreterResetFailed(Throwable t)
_notifyInterpreterResetFailed in class InteractionsModelt - Throwable explaining why the reset failed.protected void _notifyInteractionIncomplete()
_notifyInteractionIncomplete in class InteractionsModelprotected void _notifySlaveJVMUsed()
_notifySlaveJVMUsed in class InteractionsModelpublic ConsoleDocument getConsoleDocument()
getConsoleDocument in class InteractionsModel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||