|
From: <caw...@us...> - 2007-03-23 19:25:09
|
Revision: 2219
http://svn.sourceforge.net/rubyeclipse/?rev=2219&view=rev
Author: cawilliams
Date: 2007-03-23 12:25:07 -0700 (Fri, 23 Mar 2007)
Log Message:
-----------
use ProcessBuilder to create the external processes to RI, this allows us to force STDERR to redirect into input stream of process.
So we shouldn't be able to hang on reading input in case of errors (and we flow the error/stack trace on over to the view).
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/infoviews/RIView.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/infoviews/RIView.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/infoviews/RIView.java 2007-03-23 19:10:48 UTC (rev 2218)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/infoviews/RIView.java 2007-03-23 19:25:07 UTC (rev 2219)
@@ -3,7 +3,6 @@
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
-import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collection;
@@ -263,8 +262,10 @@
try {
List<String> args = getArgList();
args.add(0, riPath.toString());
- String[] argArray= (String[]) args.toArray(new String[args.size()]);
- Process p= Runtime.getRuntime().exec(argArray);
+ ProcessBuilder builder = new ProcessBuilder();
+ builder.command(args);
+ builder.redirectErrorStream(true);
+ Process p = builder.start();
handleOutput(p);
} catch (IOException e) {
// message of RuntimeException will be displayed in the RI View
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|