Method Summary |
|
protected void | _createNewDebugPort() Generates an available port for use with the debugger. |
protected static String | _deleteSemiColon(String s) Deletes the last character of a string. |
protected ArrayList<String> | _getHistoryText(FileOpenSelector selector) Opens the files chosen in the given file selector, and returns an ArrayList with one history string
for each selected file. |
public void | _interactionIsOver() Any common behavior when an interaction ends. |
abstract protected void | _interpret(String toEval) Interprets the given command. |
abstract protected void | _interpreterResetFailed(Throwable t) Any extra action to perform (beyond notifying listeners) when the interpreter fails to reset. |
abstract protected void | _notifyInteractionEnded() Notifies listeners that an interaction has ended. |
abstract protected void | _notifyInteractionIncomplete() Notifies the view that the current interaction is incomplete. |
abstract protected void | _notifyInteractionStarted() Notifies listeners that an interaction has started. |
abstract protected void | _notifyInterpreterExited(int status) Notifies listeners that the interpreter has exited unexpectedly. |
abstract public void | _notifyInterpreterReady(File wd) Notifies listeners that the interpreter is ready. |
abstract protected void | _notifyInterpreterResetFailed(Throwable t) Notifies listeners that the interpreter reset failed. |
abstract protected void | _notifyInterpreterResetting() Notifies listeners that the interpreter is resetting. |
abstract protected void | _notifySlaveJVMUsed() Notifies listeners that the slave JVM has been used. |
abstract protected void | _notifySyntaxErrorOccurred(int offset, int length) |
protected ArrayList<String> | _removeSeparators(String text) Removes the interaction-separator comments from a history, so that they will not appear when executing
the history.
Parameters: text - The full, formatted text of an interactions history (obtained from _getHistoryText) A list of strings representing each interaction in the history. |
abstract protected void | _resetInterpreter(File wd) Resets the Java interpreter. |
protected static String | _testClassCall(String s) Assumes a trimmed String. |
public void | _writerDelay() Waits for a small amount of time on a shared writer lock. |
abstract public void | addBuildDirectoryClassPath(File f) |
abstract public void | addExternalFilesClassPath(File f) |
abstract public void | addExtraClassPath(File f) |
public void | addListener(InteractionsListener listener) Add an InteractionsListener to the model. |
public void | addNewLine() |
abstract public void | addProjectClassPath(File f) These add the given path to the classpaths used in the interpreter. |
abstract public void | addProjectFilesClassPath(File f) |
public void | append(String s, String styleName) Appends a string to the given document using a named style. |
public void | changeInputListener(InputListener oldListener, InputListener newListener) Changes the input listener. |
public String | getBanner() |
public static String | getBanner(File wd) |
abstract public ConsoleDocument | getConsoleDocument() |
public String | getConsoleInput() Returns a line of text entered by the user at the equivalent of System.in. |
public int | getDebugPort() Returns the port number to use for debugging the interactions JVM. |
public InteractionsDocument | getDocument() Returns the InteractionsDocument stored by this model. |
public Pair<String, String> | getLastError() Return the last error as a pair (exception class name, message), or null if successful. |
public Pair<String, String> | getSecondToLastError() Return the second to last error as a pair (exception class name, message), or null if successful. |
public String | getStartUpBanner() |
abstract public String | getVariableClassName(String var) Gets the class name of a variable in the current interpreter. |
abstract public String | getVariableToString(String var) Gets the string representation of the value of a variable in the current interpreter. |
public File | getWorkingDirectory() Returns the working directory for the current interpreter. |
public void | interactionContinues() |
final public void | interpret(String toEval) Interprets the given command.
Parameters: toEval - command to be evaluated. |
public void | interpretCurrentInteraction() Interprets the current given text at the prompt in the interactions doc. |
public void | interpreterReady(File wd) Called when a new Java interpreter has registered and is ready for use. |
public void | interpreterResetFailed(Throwable t) |
public void | interpreterResetting() Called when the interpreter starts to reset. |
public void | loadHistory(FileOpenSelector selector) Interprets the files selected in the FileOpenSelector. |
public InteractionsScriptModel | loadHistoryAsScript(FileOpenSelector selector) |
public void | removeAllInteractionListeners() Removes all InteractionsListeners from this model. |
public String | removeLastFromHistory() Returns the last history item and then removes it, or returns null if the history is empty. |
public void | removeListener(InteractionsListener listener) Remove an InteractionsListener from the model. |
public void | replCalledSystemExit(int status) Signifies that the most recent interpretation contained a call to System.exit. |
public void | replReturnedResult(String result, String style) Signifies that the most recent interpretation completed successfully, returning a value.
Parameters: result - The .toString-ed version of the value that was returned by the interpretation. |
public void | replReturnedSyntaxError(String errorMessage, String interaction, int startRow, int startCol, int endRow, int endCol) Signifies that the most recent interpretation was preempted by a syntax error. |
public void | replReturnedVoid() Signifies that the most recent interpretation completed successfully, returning no value. |
public void | replSystemErrPrint(String s) Called when the repl prints to System.err. |
public void | replSystemOutPrint(String s) Called when the repl prints to System.out. |
public void | replThrewException(String exceptionClass, String message, String stackTrace, String shortMessage) Signifies that the most recent interpretation was ended due to an exception being thrown. |
final public void | resetInterpreter(File wd) Resets the Java interpreter with working directry wd. |
public void | resetLastErrors() Reset the information about the last and second to last error. |
public void | setDebugPort(int port) Sets the port number to use for debugging the interactions JVM. |
public void | setInputListener(InputListener listener) Sets the listener for any type of single-source input event. |
public void | setWaitingForFirstInterpreter(boolean waiting) Sets this model's notion of whether it is waiting for the first interpreter to connect. |
public void | slaveJVMUsed() Called when the slave JVM has been used for interpretation or unit testing. |