forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r105833 - forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards
Date Fri, 19 Nov 2004 17:01:40 GMT
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();

Mime
View raw message