|
From: <caw...@us...> - 2007-01-19 21:36:58
|
Revision: 1827
http://svn.sourceforge.net/rubyeclipse/?rev=1827&view=rev
Author: cawilliams
Date: 2007-01-19 13:36:56 -0800 (Fri, 19 Jan 2007)
Log Message:
-----------
just try to get back to building properly...
Modified Paths:
--------------
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchConfigurationDelegate.java
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitRunnerConfiguration.java
Modified: trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchConfigurationDelegate.java
===================================================================
--- trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchConfigurationDelegate.java 2007-01-19 21:23:16 UTC (rev 1826)
+++ trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchConfigurationDelegate.java 2007-01-19 21:36:56 UTC (rev 1827)
@@ -1,12 +1,9 @@
package org.rubypeople.rdt.testunit.launcher;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.rubypeople.rdt.internal.launching.InterpreterRunnerConfiguration;
-import org.rubypeople.rdt.internal.launching.RubyApplicationLaunchConfigurationDelegate;
import org.rubypeople.rdt.internal.testunit.ui.TestunitPlugin;
+import org.rubypeople.rdt.launching.RubyLaunchDelegate;
-public class TestUnitLaunchConfigurationDelegate extends RubyApplicationLaunchConfigurationDelegate {
+public class TestUnitLaunchConfigurationDelegate extends RubyLaunchDelegate {
/**
* The single test type, or "" iff running a launch container.
*/
@@ -25,12 +22,5 @@
public TestUnitLaunchConfigurationDelegate() {
super();
}
-
- protected InterpreterRunnerConfiguration wrapConfigurationAndHandleLaunch(ILaunchConfiguration configuration, ILaunch launch) {
-
- TestUnitRunnerConfiguration testRunnerConfiguration = new TestUnitRunnerConfiguration(configuration) ;
- launch.setAttribute(TestunitPlugin.TESTUNIT_PORT_ATTR, Integer.toString(testRunnerConfiguration.getPort())) ;
- return testRunnerConfiguration ;
- }
-
+// FIXME This won't work anymore!
}
\ No newline at end of file
Modified: trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitRunnerConfiguration.java
===================================================================
--- trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitRunnerConfiguration.java 2007-01-19 21:23:16 UTC (rev 1826)
+++ trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitRunnerConfiguration.java 2007-01-19 21:36:56 UTC (rev 1827)
@@ -9,14 +9,16 @@
import org.eclipse.debug.core.ILaunchConfiguration;
import org.rubypeople.rdt.core.RubyCore;
import org.rubypeople.rdt.core.SocketUtil;
-import org.rubypeople.rdt.internal.launching.InterpreterRunnerConfiguration;
import org.rubypeople.rdt.internal.testunit.ui.TestunitPlugin;
+import org.rubypeople.rdt.launching.VMRunnerConfiguration;
-public class TestUnitRunnerConfiguration extends InterpreterRunnerConfiguration {
+public class TestUnitRunnerConfiguration extends VMRunnerConfiguration {
private int port = -1 ;
+ private ILaunchConfiguration configuration;
public TestUnitRunnerConfiguration(ILaunchConfiguration aConfiguration) {
- super(aConfiguration);
+ super(getTestRunnerPath(), null);
+ configuration = aConfiguration;
}
public String getAbsoluteFileName() {
@@ -61,9 +63,9 @@
/*
* (non-Javadoc)
*
- * @see org.rubypeople.rdt.internal.launching.InterpreterRunnerConfiguration#getProgramArguments()
+ * @see org.rubypeople.rdt.launching.VMRunnerConfiguration#getProgramArguments()
*/
- public String getProgramArguments() {
+ public String[] getProgramArguments() {
String fileName = "";
String testClass = "";
String testMethod = "";
@@ -81,18 +83,17 @@
throw new RuntimeException("Could not get necessary attributes from the launch configuration.") ;
}
- return "\"" + fileName + "\" " + this.getPort() + " " + keepAlive + " " + testClass + " " + testMethod;
+ return new String[] { fileName, Integer.toString(getPort()), Boolean.toString(keepAlive), testClass, testMethod};
}
- public List renderLoadPath() {
- List loadPath = super.renderLoadPath();
-
- String absoluteTestFileName = this.getAbsoluteTestFileName();
- if (absoluteTestFileName.length() != 0) {
- loadPath.add("-I");
- loadPath.add(absoluteTestFileName);
+ public String[] getLoadPath() {
+ String[] loadPath = super.getLoadPath();
+ String[] newLoadPath = new String[loadPath.length + 1];
+ for (int i = 0; i < loadPath.length; i++) {
+ newLoadPath[i] = loadPath[i];
}
- return loadPath;
+ newLoadPath[loadPath.length] = getAbsoluteTestFileName();
+ return newLoadPath;
}
public static String getTestRunnerPath() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|