|
From: <caw...@us...> - 2007-02-23 18:33:37
|
Revision: 2015
http://svn.sourceforge.net/rubyeclipse/?rev=2015&view=rev
Author: cawilliams
Date: 2007-02-23 10:33:32 -0800 (Fri, 23 Feb 2007)
Log Message:
-----------
make tests work cross-platform (hopefully) and not just win32
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMDebugger.java
trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java
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 17:20:06 UTC (rev 2014)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMDebugger.java 2007-02-23 18:33:32 UTC (rev 2015)
@@ -9,6 +9,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.debug.core.ILaunch;
@@ -146,7 +147,7 @@
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)));
+ arguments.add(new Path(getDirectoryOfRubyDebuggerFile()).toOSString());
if (!debugTarget.isUsingDefaultPort()) {
arguments.add("-r" + debugTarget.getDebugParameterFile().getAbsolutePath());
}
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 17:20:06 UTC (rev 2014)
+++ trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java 2007-02-23 18:33:32 UTC (rev 2015)
@@ -11,6 +11,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
@@ -78,22 +79,24 @@
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(new Path(interpreter.getInstallLocation().getAbsolutePath()).append("bin").append("ruby").toOSString());
+ buffer.append("\" ");
buffer.append(INTERPRETER_ARGUMENTS);
buffer.append(" -I \"");
buffer.append(project.getLocation().toOSString());
buffer.append("\"");
if (debug) {
buffer.append(" -I \"");
- buffer.append(StandardVMDebugger.getDirectoryOfRubyDebuggerFile().replace('/', '\\'));
+ buffer.append(new Path(StandardVMDebugger.getDirectoryOfRubyDebuggerFile()).toOSString());
buffer.append("\"");
buffer.append(" -r");
buffer.append(debugFile);
buffer.append(" -rclassic-debug");
}
buffer.append(" -- ");
- buffer.append(RUBY_LIB_DIR + "\\" + RUBY_FILE_NAME);
+ buffer.append(RUBY_LIB_DIR);
+ buffer.append(File.separator);
+ buffer.append(RUBY_FILE_NAME);
buffer.append(' ');
buffer.append(PROGRAM_ARGUMENTS);
return buffer.toString();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|