|
||||||||||
| 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 |
|---|
_autoImportSet, _cDoc, _document, _inputListener, _lastError, _notifier, _pane, _secondToLastError, _waitingForFirstInterpreter, _workingDirectory, _writerLock, BANNER_PREFIX, WRITE_DELAY |
| 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,
boolean force)
Resets the Java interpreter. |
private void |
_updateDocument(String prompt,
boolean inProgress)
Updates the prompt and status of the document after an interpreter change. |
void |
addBuildDirectoryClassPath(File f)
These add the given path to the build directory class paths used in the interpreter. |
void |
addExternalFilesClassPath(File f)
These add the given path to the external files class paths used in the interpreter. |
void |
addExtraClassPath(File f)
These add the given path to the extra class paths 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 class path. |
void |
addProjectFilesClassPath(File f)
These add the given path to the project files class paths used in the interpreter. |
Iterable<File> |
getClassPath()
Gets the interpreter class path from the interpreter jvm. |
Pair<String,String> |
getVariableToString(String var)
Gets the string representation of the value 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 |
setEnforceAllAccess(boolean enforce)
Sets whether or not the interpreter should enforce access to all members. |
void |
setEnforcePrivateAccess(boolean enforce)
Sets whether or not the interpreter should enforce access to private members. |
void |
setRequireSemicolon(boolean require)
Require a semicolon at the end of statements. |
void |
setRequireVariableType(boolean require)
Require variable declarations to include an explicit type. |
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 |
| Methods inherited from interface edu.rice.cs.drjava.model.repl.InteractionsModelCallback |
|---|
getCompilerBootClassPath, transformCommands |
| 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 println| Method Detail |
|---|
protected void _interpret(String toEval)
_interpret in class InteractionsModeltoEval - command to be evaluatedpublic Pair<String,String> getVariableToString(String var)
getVariableToString in class InteractionsModelvar - the name of the variable
null if the variable is not defined.public void addProjectClassPath(File f)
addProjectClassPath in class InteractionsModelf - the path to addpublic void addBuildDirectoryClassPath(File f)
addBuildDirectoryClassPath in class InteractionsModelf - the path to addpublic void addProjectFilesClassPath(File f)
addProjectFilesClassPath in class InteractionsModelf - the path to addpublic void addExternalFilesClassPath(File f)
addExternalFilesClassPath in class InteractionsModelf - the path to addpublic void addExtraClassPath(File f)
addExtraClassPath in class InteractionsModelf - the path to add
protected void _resetInterpreter(File wd,
boolean force)
_resetInterpreter in class InteractionsModelpublic 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 remove
public void setActiveInterpreter(String name,
String prompt)
name - the (unique) name of the interpreter.prompt - the prompt the interpreter should have.public void setToDefaultInterpreter()
private void _updateDocument(String prompt,
boolean inProgress)
prompt - New prompt to displayinProgress - whether the interpreter is currently in progressprotected 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 setEnforceAllAccess(boolean enforce)
public void setEnforcePrivateAccess(boolean enforce)
public void setRequireSemicolon(boolean require)
public void setRequireVariableType(boolean require)
public Iterable<File> getClassPath()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||