You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by rg...@apache.org on 2004/11/19 18:01:40 UTC
svn commit: r105833 - forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards
Author: rgardler
Date: Fri Nov 19 09:01:39 2004
New Revision: 105833
Modified:
forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewProjectWizard.java
Log:
capture the output of the seeding proces
Modified: forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewProjectWizard.java
==============================================================================
--- forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewProjectWizard.java (original)
+++ forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewProjectWizard.java Fri Nov 19 09:01:39 2004
@@ -15,7 +15,9 @@
*/
package org.apache.forrest.eclipse.wizards;
+import java.io.BufferedReader;
import java.io.IOException;
+import java.io.InputStreamReader;
import java.lang.reflect.InvocationTargetException;
import org.apache.forrest.eclipse.ForrestPlugin;
@@ -88,6 +90,8 @@
if (monitor == null) {
monitor= new NullProgressMonitor();
}
+
+ int exitValue = -1;
try {
String strName = page.getProjectName();
monitor.beginTask("Creating "+ strName + " Forrest Project", 3);
@@ -116,9 +120,16 @@
cmdString = "cmd /c forrest -Dbasedir=" + strPath + "\\" + strName
+ " seed";
}
+
try {
- // TODO: if fhome is not set the wizard will fail
- Runtime.getRuntime().exec(cmdString);
+ String lineRead = null;
+ Process seedProc = Runtime.getRuntime().exec(cmdString);
+ BufferedReader reader = new BufferedReader(new InputStreamReader(seedProc.getInputStream()));
+ while((lineRead = reader.readLine()) != null) {
+ // FIXME: should be logged properly
+ System.out.println(lineRead);
+ }
+ exitValue = seedProc.exitValue();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();