setToDefaultInterpreter() Sets the default interpreter to be the current one.
Whether the new interpreter is currently in progress with an interaction (ie.
Creates a new MainJVM to interface to another JVM; the MainJVM has a link to the partially initialized
global model. The MainJVM but does not automatically start the Interpreter JVM. Callers must set the
InteractionsModel and JUnitModel and then call startInterpreterJVM().
Method Detail
addBuildDirectoryClassPath
public void addBuildDirectoryClassPath(File f)(Code)
Adds a named JavaDebugInterpreter to the list of interpreters.
Parameters: name - the unique name for the interpreter Parameters: className - the fully qualified class name of the class the debug interpreter is in throws: IllegalArgumentException - if the name is not unique
addExternalFilesClassPath
public void addExternalFilesClassPath(File f)(Code)
Adds a named DynamicJavaAdapter to the list of interpreters.
Parameters: name - the unique name for the interpreter throws: IllegalArgumentException - if the name is not unique
Called if the slave JVM encounters an illegal class file in testing. Forwards from
the other JVM to the local JUnit model.
Parameters: e - the ClassFileError describing the error when loading the class file
Sets up a JUnit test suite in the Interpreter JVM and finds which classes are really TestCases
classes (by loading them)
Parameters: classNames - the class names to run in a test Parameters: files - the associated file the class names that are actually test cases
Called when the JUnitTestManager wants to open a file that is not currently open.
Parameters: className - the name of the class for which we want to find the file the file associated with the given class
React if the slave JVM quits. Restarts the JVM unless _restart is false, and notifies the InteractionsModel
if the quit was unexpected. Called from a thread within AbstractMasterJVM waiting for the death of the process
that starts and runs the slave JVM.
Parameters: status - Status returned by the dead process.
Kills the running interpreter JVM, and restarts with working directory wd if wd != null. If wd == null, the
interpreter is not restarted. Note: If the interpreter is not restarted, all of the methods that delegate to the
interpreter will silently fail! Therefore, killing without restarting should be used with extreme care and only in
carefully controlled test cases or when DrJava is quitting anyway.
Called if JUnit is invoked on a non TestCase class. Forwards from the other JVM to the local JUnit model.
Parameters: isTestAll - whether or not it was a use of the test all button
Runs the JUnit test suite already cached in the Interpreter JVM.
false if no test suite is cached; true otherwise
setActiveInterpreter
public boolean setActiveInterpreter(String name)(Code)
Sets the current interpreter to the one specified by name
Parameters: name - the unique name of the interpreter to set active Whether the new interpreter is currently processing an interaction (i.e., whether an interactionEndedevent will be fired)
setAllowAssertions
public void setAllowAssertions(boolean allow)(Code)
Sets whether the remote JVM will run "assert" statements after the next restart.
Sets the extra (optional) arguments to be passed to the interpreter.
Parameters: argString - the arguments as they would be typed at the command-line
setPackageScope
public void setPackageScope(String packageName)(Code)
Sets the Interpreter to be in the given package.
Parameters: packageName - Name of the package to enter.
setPrivateAccessible
public void setPrivateAccessible(boolean allow)(Code)
Sets the interpreter to allow access to private members. TODO: synchronize?
setShowMessageOnResetFailure
public void setShowMessageOnResetFailure(boolean show)(Code)
Parameters: show - Whether to show a message if a reset operation fails.
setStartupClassPath
public void setStartupClassPath(String classPath)(Code)
Sets the classpath to use for starting the interpreter JVM. Must include the classes for the interpreter.
Parameters: classPath - Classpath for the interpreter JVM
Sets the default interpreter to be the current one.
Whether the new interpreter is currently in progress with an interaction (ie. whether an interactionEnded event will be fired)
Action to take if the slave JVM quits before registering. Assumes _masterJVMLock is held.
Parameters: status - Status code of the JVMTODO: revise the unit tests that kill the slave prematurely (by making them wait until theslave registers) and remove the TEST_MODE escape.
Forwards a call to System.out from InterpreterJVM to the local InteractionsModel.
Parameters: s - String that was printed in the other JVM
testEnded
public void testEnded(String testName, boolean wasSuccessful, boolean causedError) throws RemoteException(Code)
Called when a particular test has ended. Forwards from the other JVM to the local JUnit model.
Parameters: testName - The name of the test that has ended. Parameters: wasSuccessful - Whether the test passed or not. Parameters: causedError - If not successful, whether the test caused an error or simply failed.
Called when a particular test is started. Forwards from the slave JVM to the local JUnit model.
Parameters: testName - The name of the test being started.
Called when a full suite of tests has finished running. Forwards from the other JVM to the local JUnit model.
Parameters: errors - The array of errors from all failed tests in the suite.
Called to indicate that a suite of tests has started running.
Forwards from the other JVM to the local JUnit model.
Parameters: numTests - The number of tests in the suite to be run.
Fields inherited from edu.rice.cs.util.newjvm.AbstractMasterJVM