|
From: <caw...@us...> - 2007-07-19 16:41:37
|
Revision: 2801
http://svn.sourceforge.net/rubyeclipse/?rev=2801&view=rev
Author: cawilliams
Date: 2007-07-19 09:41:35 -0700 (Thu, 19 Jul 2007)
Log Message:
-----------
add a script which forces STDOUT and STDERR to sync/auto-flush. Then add that script in secretly on command line for all ruby launches.
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMDebugger.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMRunner.java
Added Paths:
-----------
trunk/org.rubypeople.rdt.launching/ruby/sync.rb
Added: trunk/org.rubypeople.rdt.launching/ruby/sync.rb
===================================================================
--- trunk/org.rubypeople.rdt.launching/ruby/sync.rb (rev 0)
+++ trunk/org.rubypeople.rdt.launching/ruby/sync.rb 2007-07-19 16:41:35 UTC (rev 2801)
@@ -0,0 +1,2 @@
+STDOUT.sync = true
+STDERR.sync = true
\ No newline at end of file
Property changes on: trunk/org.rubypeople.rdt.launching/ruby/sync.rb
___________________________________________________________________
Name: svn:mime-type
+ text/plain
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-07-19 16:22:06 UTC (rev 2800)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMDebugger.java 2007-07-19 16:41:35 UTC (rev 2801)
@@ -77,6 +77,7 @@
if (cp.length > 0) {
arguments.addAll(convertLoadPath(config, cp));
}
+ addStreamSync(arguments);
arguments.addAll(debugSpecificVMArgs(debugTarget));
arguments.add(StandardVMRunner.END_OF_OPTIONS_DELIMITER);
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMRunner.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMRunner.java 2007-07-19 16:22:06 UTC (rev 2800)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMRunner.java 2007-07-19 16:41:35 UTC (rev 2801)
@@ -22,6 +22,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.model.IProcess;
@@ -32,6 +33,8 @@
public class StandardVMRunner extends AbstractVMRunner {
+ private static final String LOADPATH_SWITCH = "-I";
+
protected static final String END_OF_OPTIONS_DELIMITER = "--";
protected IVMInstall fVMInstance;
@@ -180,7 +183,7 @@
String path = lp[i];
// Don't add project to loadpath if project is working directory
if (working != null && working.equals(path)) continue;
- strings.add("-I"); //$NON-NLS-1$
+ strings.add(LOADPATH_SWITCH); //$NON-NLS-1$
strings.add(path);
}
return strings;
@@ -212,6 +215,7 @@
if (lp.length > 0) {
arguments.addAll(convertLoadPath(config, lp));
}
+ addStreamSync(arguments);
arguments.add(END_OF_OPTIONS_DELIMITER);
arguments.add(config.getFileToLaunch());
@@ -251,4 +255,11 @@
subMonitor.done();
}
+ protected void addStreamSync(List<String> arguments) {
+ File sync = LaunchingPlugin.getFileInPlugin(new Path("ruby/sync.rb"));
+ arguments.add(LOADPATH_SWITCH);
+ arguments.add(sync.getParent());
+ arguments.add("-rsync.rb");
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|