|
From: <caw...@us...> - 2007-02-23 17:20:12
|
Revision: 2014
http://svn.sourceforge.net/rubyeclipse/?rev=2014&view=rev
Author: cawilliams
Date: 2007-02-23 09:20:06 -0800 (Fri, 23 Feb 2007)
Log Message:
-----------
fix broken test
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVM.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMDebugger.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/AbstractVMRunner.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/IVMRunner.java
trunk/org.rubypeople.rdt.launching.tests/plugin.xml
trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java
Added Paths:
-----------
trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestRubyDebugDebugger.java
trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestVM.java
trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestVMDebugger.java
trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestVMRunner.java
trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestVMType.java
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVM.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVM.java 2007-02-23 16:01:27 UTC (rev 2013)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVM.java 2007-02-23 17:20:06 UTC (rev 2014)
@@ -40,7 +40,7 @@
return null;
}
- private boolean useRDebug() {
+ protected boolean useRDebug() {
return LaunchingPlugin.getDefault().getPluginPreferences().getBoolean(PreferenceConstants.USE_RUBY_DEBUG);
}
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMDebugger.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMDebugger.java 2007-02-23 16:01:27 UTC (rev 2013)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMDebugger.java 2007-02-23 17:20:06 UTC (rev 2014)
@@ -139,11 +139,14 @@
}
protected RubyDebuggerProxy getDebugProxy(RubyDebugTarget debugTarget) {
- return new RubyDebuggerProxy(debugTarget, RDebugVMDebugger.getDirectoryOfRubyDebuggerFile(), false);
+ return new RubyDebuggerProxy(debugTarget, getDirectoryOfRubyDebuggerFile(), false);
}
protected List<String> debugSpecificVMArgs(RubyDebugTarget debugTarget) {
List<String> arguments = new ArrayList<String>();
+// FIXME Somehow hook this into the loadpath stuff?
+ arguments.add("-I");
+ arguments.add(LaunchingPlugin.osDependentPath(getDirectoryOfRubyDebuggerFile().replace('/', File.separatorChar)));
if (!debugTarget.isUsingDefaultPort()) {
arguments.add("-r" + debugTarget.getDebugParameterFile().getAbsolutePath());
}
@@ -153,9 +156,6 @@
} else {
arguments.add("-rclassic-debug");
}
- // FIXME Somehow hook this into the loadpath stuff?
- arguments.add("-I");
- arguments.add(LaunchingPlugin.osDependentPath(getDirectoryOfRubyDebuggerFile().replace('/', File.separatorChar)));
return arguments;
}
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/AbstractVMRunner.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/AbstractVMRunner.java 2007-02-23 16:01:27 UTC (rev 2013)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/AbstractVMRunner.java 2007-02-23 17:20:06 UTC (rev 2014)
@@ -68,7 +68,7 @@
* @see DebugPlugin#exec(String[], File, String[])
*/
protected Process exec(String[] cmdLine, File workingDirectory, String[] envp) throws CoreException {
- LaunchingPlugin.debug("Starting: " + getCmdLineAsString(cmdLine)) ;
+// LaunchingPlugin.debug("Starting: " + getCmdLineAsString(cmdLine)) ;
return DebugPlugin.exec(cmdLine, workingDirectory, envp);
}
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/IVMRunner.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/IVMRunner.java 2007-02-23 16:01:27 UTC (rev 2013)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/IVMRunner.java 2007-02-23 17:20:06 UTC (rev 2014)
@@ -26,7 +26,7 @@
public interface IVMRunner {
/**
- * Launches a Java VM as specified in the given configuration,
+ * Launches a Ruby VM as specified in the given configuration,
* contributing results (debug targets and processes), to the
* given launch.
*
Modified: trunk/org.rubypeople.rdt.launching.tests/plugin.xml
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/plugin.xml 2007-02-23 16:01:27 UTC (rev 2013)
+++ trunk/org.rubypeople.rdt.launching.tests/plugin.xml 2007-02-23 17:20:06 UTC (rev 2014)
@@ -21,6 +21,15 @@
<import plugin="org.rubypeople.eclipse.testutils"/>
<import plugin="org.rubypeople.rdt.core"/>
<import plugin="org.rubypeople.rdt.core.tests"/>
+ <import plugin="org.rubypeople.rdt.debug.core"/>
</requires>
+
+ <extension
+ point="org.rubypeople.rdt.launching.vmInstallTypes">
+ <vmInstallType
+ class="org.rubypeople.rdt.internal.launching.TestVMType"
+ id="org.rubypeople.rdt.launching.TestVMType">
+ </vmInstallType>
+ </extension>
</plugin>
Modified: trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java 2007-02-23 16:01:27 UTC (rev 2013)
+++ trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java 2007-02-23 17:20:06 UTC (rev 2014)
@@ -1,8 +1,6 @@
package org.rubypeople.rdt.internal.launching;
import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
import java.util.Map;
@@ -20,10 +18,11 @@
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.Launch;
+import org.eclipse.debug.core.model.IProcess;
import org.rubypeople.eclipse.shams.debug.core.ShamLaunchConfigurationType;
import org.rubypeople.rdt.core.IRubyProject;
-import org.rubypeople.rdt.core.RubyCore;
import org.rubypeople.rdt.core.tests.ModifyingResourceTest;
+import org.rubypeople.rdt.internal.debug.core.model.RubyDebugTarget;
import org.rubypeople.rdt.launching.IRubyLaunchConfigurationConstants;
import org.rubypeople.rdt.launching.IVMInstall;
import org.rubypeople.rdt.launching.IVMInstallType;
@@ -33,19 +32,17 @@
public class TC_RunnerLaunching extends ModifyingResourceTest {
private final static String PROJECT_NAME = "Simple Project";
- private final static String RUBY_LIB_DIR = "someRubyDir"; // dir inside project
- private final static String RUBY_FILE_NAME = "rubyFile.rb";
+ private final static String RUBY_LIB_DIR = "someRubyDir"; // dir inside
+ // project
+ private final static String RUBY_FILE_NAME = "rubyFile.rb";
private final static String INTERPRETER_ARGUMENTS = "interpreter Arguments";
private final static String PROGRAM_ARGUMENTS = "programArguments";
- private final static String RUBY_COMMAND = "rubyw";
-
- private static final String VM_TYPE_ID = "org.rubypeople.rdt.launching.StandardVMType";
+
+ private static final String VM_TYPE_ID = "org.rubypeople.rdt.launching.TestVMType";
private IVMInstallType vmType;
private IVMInstall interpreter;
private IRubyProject project;
-
- // XXX This test class desperately needs to be rewritten...
-
+
public TC_RunnerLaunching(String name) {
super(name);
}
@@ -55,95 +52,76 @@
super.setUp();
project = createRubyProject('/' + PROJECT_NAME);
IFolder location = createFolder('/' + PROJECT_NAME + "/interpreterOne");
- createFolder('/' + PROJECT_NAME +"/interpreterOne/lib");
- createFolder('/' + PROJECT_NAME +"/interpreterOne/bin");
- createFile('/' + PROJECT_NAME +"/interpreterOne/bin/ruby", "");
-
+ createFolder('/' + PROJECT_NAME + "/interpreterOne/lib");
+ createFolder('/' + PROJECT_NAME + "/interpreterOne/bin");
+ createFile('/' + PROJECT_NAME + "/interpreterOne/bin/ruby", "");
+
vmType = RubyRuntime.getVMInstallType(VM_TYPE_ID);
VMStandin standin = new VMStandin(vmType, "fake");
standin.setName("fake");
standin.setInstallLocation(location.getLocation().toFile());
interpreter = standin.convertToRealVM();
- RubyRuntime.setDefaultVMInstall(interpreter, null, true);
+ RubyRuntime.setDefaultVMInstall(interpreter, null, true);
}
-
+
@Override
protected void tearDown() throws Exception {
super.tearDown();
deleteProject('/' + PROJECT_NAME);
vmType.disposeVMInstall(interpreter.getId());
}
-
+
protected ILaunchManager getLaunchManager() {
return DebugPlugin.getDefault().getLaunchManager();
}
- protected List getCommandLine(IProject project, boolean debug) {
- List commandLine = new ArrayList();
+ protected String getCommandLine(IProject project, String debugFile, boolean debug) {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(" \"");
+ buffer.append(interpreter.getInstallLocation());
+ buffer.append("\\bin\\ruby\" ");
+ buffer.append(INTERPRETER_ARGUMENTS);
+ buffer.append(" -I \"");
+ buffer.append(project.getLocation().toOSString());
+ buffer.append("\"");
if (debug) {
- commandLine.add("-rclassic-debug");
+ buffer.append(" -I \"");
+ buffer.append(StandardVMDebugger.getDirectoryOfRubyDebuggerFile().replace('/', '\\'));
+ buffer.append("\"");
+ buffer.append(" -r");
+ buffer.append(debugFile);
+ buffer.append(" -rclassic-debug");
}
- // The include paths and the executed ruby file is quoted on windows
- if (debug) {
- String dirOfRubyDebuggerFile = getDirectoryOfRubyDebuggerFile().replace('/', File.separatorChar) ;
- if (dirOfRubyDebuggerFile.startsWith("\\")) {
- dirOfRubyDebuggerFile = dirOfRubyDebuggerFile.substring(1) ;
- }
- commandLine.add("-I");
- commandLine.add(dirOfRubyDebuggerFile);
- }
- commandLine.add("-I");
- commandLine.add(project.getLocation().toOSString());
- commandLine.add("-I");
- commandLine.add(project.getLocation().toOSString() + File.separator + RUBY_LIB_DIR ) ;
- commandLine.addAll(Arrays.asList(INTERPRETER_ARGUMENTS.split("\\s+")));
- commandLine.add("--");
- // use always forward slashes for path relative to project dir
- commandLine.add(project.getLocation().toOSString() + "/" + RUBY_LIB_DIR + "/" + RUBY_FILE_NAME );
- commandLine.add(PROGRAM_ARGUMENTS);
- return commandLine;
+ buffer.append(" -- ");
+ buffer.append(RUBY_LIB_DIR + "\\" + RUBY_FILE_NAME);
+ buffer.append(' ');
+ buffer.append(PROGRAM_ARGUMENTS);
+ return buffer.toString();
}
- private String getDirectoryOfRubyDebuggerFile() {
- return RubyCore.getOSDirectory(LaunchingPlugin.getDefault()) + "ruby";
- }
-
public void testDebugEnabled() throws Exception {
// check if debugging is enabled in plugin.xml
- ILaunchConfigurationType launchConfigurationType =
- getLaunchManager().getLaunchConfigurationType(
- RubyLaunchConfigurationAttribute.RUBY_LAUNCH_CONFIGURATION_TYPE);
+ ILaunchConfigurationType launchConfigurationType = getLaunchManager().getLaunchConfigurationType(RubyLaunchConfigurationAttribute.RUBY_LAUNCH_CONFIGURATION_TYPE);
assertEquals("Ruby Application", launchConfigurationType.getName());
- assertTrue(
- "LaunchConfiguration supports debug",
- launchConfigurationType.supportsMode(ILaunchManager.DEBUG_MODE));
+ assertTrue("LaunchConfiguration supports debug", launchConfigurationType.supportsMode(ILaunchManager.DEBUG_MODE));
}
public void launch(boolean debug) throws Exception {
ILaunchConfiguration configuration = new ShamLaunchConfiguration();
ILaunch launch = new Launch(configuration, debug ? ILaunchManager.DEBUG_MODE : ILaunchManager.RUN_MODE, null);
- ILaunchConfigurationType launchConfigurationType =
- getLaunchManager().getLaunchConfigurationType(
- RubyLaunchConfigurationAttribute.RUBY_LAUNCH_CONFIGURATION_TYPE);
- launchConfigurationType.getDelegate(debug ? "debug" : "run").launch(
- configuration,
- debug ? ILaunchManager.DEBUG_MODE : ILaunchManager.RUN_MODE,
- launch,
- null);
+ ILaunchConfigurationType launchConfigurationType = getLaunchManager().getLaunchConfigurationType(RubyLaunchConfigurationAttribute.RUBY_LAUNCH_CONFIGURATION_TYPE);
+ launchConfigurationType.getDelegate(debug ? "debug" : "run").launch(configuration, debug ? ILaunchManager.DEBUG_MODE : ILaunchManager.RUN_MODE, launch, null);
- assertEquals("One process has been spawned", 1, launch.getProcesses().length);
- List expected = getCommandLine(project.getProject(), debug);
- String[] actual = interpreter.getVMArguments();
+ RubyDebugTarget debugTarget = (RubyDebugTarget) launch.getDebugTarget();
+ String debugFile = "";
if (debug) {
- // we must cheat with the first argument, because it is a temporary file which
- // contains is different for every call
- expected.add(0, actual[0]) ;
+ debugFile = debugTarget.getDebugParameterFile().getAbsolutePath();
}
- assertEquals("Assembled command line.", expected, actual);
- assertEquals(
- "Process label.",
- "Ruby " + RUBY_COMMAND + " : " + RUBY_LIB_DIR + "/" + RUBY_FILE_NAME,
- launch.getProcesses()[0].getLabel());
+
+ assertEquals("Only one process should have been spawned", 1, launch.getProcesses().length);
+ IProcess process = launch.getProcesses()[0];
+ String expected = getCommandLine(project.getProject(), debugFile, debug);
+ assertEquals(expected, process.getAttribute(IProcess.ATTR_CMDLINE));
}
public void testRunInDebugMode() throws Exception {
@@ -163,8 +141,7 @@
return null;
}
- public void delete() throws CoreException {
- }
+ public void delete() throws CoreException {}
public boolean exists() {
return true;
@@ -193,12 +170,10 @@
return RUBY_LIB_DIR + File.separator + RUBY_FILE_NAME;
} else if (attributeName.equals(RubyLaunchConfigurationAttribute.WORKING_DIRECTORY)) {
return '/' + PROJECT_NAME;
- } else if (attributeName.equals(RubyLaunchConfigurationAttribute.INTERPRETER_ARGUMENTS)) {
- return INTERPRETER_ARGUMENTS;
} else if (attributeName.equals(RubyLaunchConfigurationAttribute.PROGRAM_ARGUMENTS)) {
return PROGRAM_ARGUMENTS;
} else if (attributeName.equals(IRubyLaunchConfigurationConstants.ATTR_VM_ARGUMENTS)) {
- return "";
+ return INTERPRETER_ARGUMENTS;
}
return defaultValue;
@@ -260,28 +235,31 @@
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchConfiguration#launch(java.lang.String, org.eclipse.core.runtime.IProgressMonitor, boolean, boolean)
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.debug.core.ILaunchConfiguration#launch(java.lang.String,
+ * org.eclipse.core.runtime.IProgressMonitor, boolean, boolean)
*/
public ILaunch launch(String mode, IProgressMonitor monitor, boolean build, boolean register) throws CoreException {
// TODO Auto-generated method stub
return null;
}
- public IResource[] getMappedResources() throws CoreException {
- // TODO Auto-generated method stub
- return null;
- }
+ public IResource[] getMappedResources() throws CoreException {
+ // TODO Auto-generated method stub
+ return null;
+ }
- public boolean isMigrationCandidate() throws CoreException {
- // TODO Auto-generated method stub
- return false;
- }
+ public boolean isMigrationCandidate() throws CoreException {
+ // TODO Auto-generated method stub
+ return false;
+ }
- public void migrate() throws CoreException {
- // TODO Auto-generated method stub
-
- }
+ public void migrate() throws CoreException {
+ // TODO Auto-generated method stub
+
+ }
}
}
Added: trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestRubyDebugDebugger.java
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestRubyDebugDebugger.java (rev 0)
+++ trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestRubyDebugDebugger.java 2007-02-23 17:20:06 UTC (rev 2014)
@@ -0,0 +1,41 @@
+package org.rubypeople.rdt.internal.launching;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.rubypeople.rdt.internal.debug.core.RubyDebuggerProxy;
+import org.rubypeople.rdt.internal.debug.core.model.IRubyDebugTarget;
+import org.rubypeople.rdt.internal.debug.core.model.RubyDebugTarget;
+import org.rubypeople.rdt.internal.debug.core.model.RubyProcessingException;
+import org.rubypeople.rdt.launching.IVMInstall;
+import org.rubypeople.rdt.launching.IVMRunner;
+
+public class TestRubyDebugDebugger extends RDebugVMDebugger implements IVMRunner {
+
+ public TestRubyDebugDebugger(IVMInstall vmInstance) {
+ super(vmInstance);
+ }
+ @Override
+ protected Process exec(String[] cmdLine, File workingDirectory, String[] envp) throws CoreException {
+ return new ShamProcess();
+ }
+
+ @Override
+ protected RubyDebuggerProxy getDebugProxy(RubyDebugTarget debugTarget) {
+ return new TestDebuggerProxy(debugTarget, getDirectoryOfRubyDebuggerFile(), true);
+ }
+
+ private static class TestDebuggerProxy extends RubyDebuggerProxy {
+
+ public TestDebuggerProxy(IRubyDebugTarget debugTarget, String rubyFileDirectory, boolean isRubyDebug) {
+ super(debugTarget, rubyFileDirectory, isRubyDebug);
+ }
+
+ @Override
+ public void start() throws RubyProcessingException, IOException {
+ // intentionally empty
+ }
+
+ }
+}
Added: trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestVM.java
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestVM.java (rev 0)
+++ trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestVM.java 2007-02-23 17:20:06 UTC (rev 2014)
@@ -0,0 +1,25 @@
+package org.rubypeople.rdt.internal.launching;
+
+import org.eclipse.debug.core.ILaunchManager;
+import org.rubypeople.rdt.launching.IVMInstall;
+import org.rubypeople.rdt.launching.IVMInstallType;
+import org.rubypeople.rdt.launching.IVMRunner;
+
+public class TestVM extends StandardVM implements IVMInstall {
+
+ public TestVM(IVMInstallType type, String id) {
+ super(type, id);
+ }
+ @Override
+ public IVMRunner getVMRunner(String mode) {
+ if (ILaunchManager.RUN_MODE.equals(mode)) {
+ return new TestVMRunner(this);
+ } else if (ILaunchManager.DEBUG_MODE.equals(mode)) {
+ if (useRDebug()) {
+ return new TestRubyDebugDebugger(this);
+ }
+ return new TestVMDebugger(this);
+ }
+ return null;
+ }
+}
Added: trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestVMDebugger.java
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestVMDebugger.java (rev 0)
+++ trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestVMDebugger.java 2007-02-23 17:20:06 UTC (rev 2014)
@@ -0,0 +1,43 @@
+package org.rubypeople.rdt.internal.launching;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.rubypeople.rdt.internal.debug.core.RubyDebuggerProxy;
+import org.rubypeople.rdt.internal.debug.core.model.IRubyDebugTarget;
+import org.rubypeople.rdt.internal.debug.core.model.RubyDebugTarget;
+import org.rubypeople.rdt.internal.debug.core.model.RubyProcessingException;
+import org.rubypeople.rdt.launching.IVMInstall;
+import org.rubypeople.rdt.launching.IVMRunner;
+
+public class TestVMDebugger extends StandardVMDebugger implements IVMRunner {
+
+ public TestVMDebugger(IVMInstall vmInstance) {
+ super(vmInstance);
+ }
+
+ @Override
+ protected Process exec(String[] cmdLine, File workingDirectory, String[] envp) throws CoreException {
+ return new ShamProcess();
+ }
+
+ @Override
+ protected RubyDebuggerProxy getDebugProxy(RubyDebugTarget debugTarget) {
+ return new TestDebuggerProxy(debugTarget, getDirectoryOfRubyDebuggerFile(), false);
+ }
+
+ private static class TestDebuggerProxy extends RubyDebuggerProxy {
+
+ public TestDebuggerProxy(IRubyDebugTarget debugTarget, String rubyFileDirectory, boolean isRubyDebug) {
+ super(debugTarget, rubyFileDirectory, isRubyDebug);
+ }
+
+ @Override
+ public void start() throws RubyProcessingException, IOException {
+ // intentionally empty
+ }
+
+ }
+
+}
Added: trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestVMRunner.java
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestVMRunner.java (rev 0)
+++ trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestVMRunner.java 2007-02-23 17:20:06 UTC (rev 2014)
@@ -0,0 +1,20 @@
+package org.rubypeople.rdt.internal.launching;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.CoreException;
+import org.rubypeople.rdt.launching.IVMInstall;
+import org.rubypeople.rdt.launching.IVMRunner;
+
+public class TestVMRunner extends StandardVMRunner implements IVMRunner {
+
+ public TestVMRunner(IVMInstall vmInstance) {
+ super(vmInstance);
+ }
+
+ @Override
+ protected Process exec(String[] cmdLine, File workingDirectory, String[] envp) throws CoreException {
+ return new ShamProcess();
+ }
+
+}
Added: trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestVMType.java
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestVMType.java (rev 0)
+++ trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TestVMType.java 2007-02-23 17:20:06 UTC (rev 2014)
@@ -0,0 +1,11 @@
+package org.rubypeople.rdt.internal.launching;
+
+import org.rubypeople.rdt.launching.IVMInstall;
+
+public class TestVMType extends StandardVMType {
+
+ @Override
+ protected IVMInstall doCreateVMInstall(String id) {
+ return new TestVM(this, id);
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|