|
||||||||||
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
public abstract class RMIInteractionsModel
A Swing specific InteractionsModel which can serve as the glue between a local InteractionsDocument and a remote JavaInterpreter in another JVM.
Field Summary | |
---|---|
protected MainJVM |
_jvm
RMI interface to the remote Java 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 | |
---|---|
RMIInteractionsModel(MainJVM jvm,
ConsoleDocumentInterface cDoc,
File wd,
int historySize,
int writeDelay)
Constructs an InteractionsModel which can communicate with another JVM. |
Method Summary | |
---|---|
protected void |
_interpret(String toEval)
Interprets the given command. |
protected abstract void |
_notifyInterpreterChanged(boolean inProgress)
Notifies listeners that the interpreter has changed. |
protected void |
_resetInterpreter(File wd)
Resets the Java interpreter. |
void |
addBuildDirectoryClassPath(File f)
These add the given path to the build directory classpaths used in the interpreter. |
void |
addExternalFilesClassPath(File f)
These add the given path to the external files classpaths used in the interpreter. |
void |
addExtraClassPath(File f)
These add the given path to the extra classpaths used in the interpreter. |
void |
addInterpreter(String name)
Adds a named interpreter to the list. |
void |
addProjectClassPath(File f)
Adds the given path to the interpreter's classpath. |
void |
addProjectFilesClassPath(File f)
These add the given path to the project files classpaths used in the interpreter. |
void |
enableRestart()
Enables restarting of slave JVM. |
Iterable<File> |
getClassPath()
Gets the interpreter classpath from the interpreter jvm. |
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 |
removeInterpreter(String name)
Removes the interpreter with the given name, if it exists. |
void |
setActiveInterpreter(String name,
String prompt)
Sets the active interpreter. |
void |
setPrivateAccessible(boolean allow)
Sets whether or not the interpreter should allow access to private members. |
void |
setToDefaultInterpreter()
Sets the default interpreter to be the current one. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final MainJVM _jvm
Constructor Detail |
---|
public RMIInteractionsModel(MainJVM jvm, ConsoleDocumentInterface cDoc, File wd, int historySize, int writeDelay)
jvm
- RMI interface to the slave JVMcDoc
- document to use in the InteractionsDocumenthistorySize
- Number of lines to store in the historywriteDelay
- Number of milliseconds to wait after each printlnMethod Detail |
---|
protected void _interpret(String toEval)
_interpret
in class InteractionsModel
toEval
- command to be evaluatedpublic String getVariableToString(String var)
getVariableToString
in class InteractionsModel
var
- the name of the variable
null
if the variable is not defined.public String getVariableType(String var)
getVariableType
in class InteractionsModel
var
- the name of the variablepublic void addProjectClassPath(File f)
addProjectClassPath
in class InteractionsModel
f
- the path to addpublic void addBuildDirectoryClassPath(File f)
addBuildDirectoryClassPath
in class InteractionsModel
f
- the path to addpublic void addProjectFilesClassPath(File f)
addProjectFilesClassPath
in class InteractionsModel
f
- the path to addpublic void addExternalFilesClassPath(File f)
addExternalFilesClassPath
in class InteractionsModel
f
- the path to addpublic void addExtraClassPath(File f)
addExtraClassPath
in class InteractionsModel
f
- the path to addprotected void _resetInterpreter(File wd)
_resetInterpreter
in class InteractionsModel
public void addInterpreter(String name)
name
- the unique name for the interpreter
IllegalArgumentException
- if the name is not uniquepublic void removeInterpreter(String name)
name
- Name of the interpreter to removepublic void setActiveInterpreter(String name, String prompt)
name
- the (unique) name of the interpreter.prompt
- the prompt the interpreter should have.public void setToDefaultInterpreter()
protected abstract void _notifyInterpreterChanged(boolean inProgress)
inProgress
- Whether the new interpreter is currently in progress with an interaction, i.e., whether
an interactionEnded event will be fired)public void setPrivateAccessible(boolean allow)
public Iterable<File> getClassPath()
public void enableRestart()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |