imporved php parser
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / actions / PHPStartApacheAction.java
index 8a6b5e2..3f1839a 100644 (file)
@@ -43,7 +43,7 @@ public class PHPStartApacheAction implements IWorkbenchWindowActionDelegate {
     execute(form.format(arguments), "Start Apache: ");
   }
 
-  public void execute(String command, String consoleMessage) {
+  public static String execute(String command, String consoleMessage) {
     //         MessageDialog.openInformation(activeWindow.getShell(), "Exec command: ", command);
     try {
       PHPConsole.write(consoleMessage+command+"\n");
@@ -55,23 +55,20 @@ public class PHPStartApacheAction implements IWorkbenchWindowActionDelegate {
       // gets the input stream to have the post-compile-time information
       InputStream stream = p.getInputStream();
 
-      // and get the string from it
-      String compilerOutput = PHPConsole.getStringFromStream(stream);
+      // get the string from Stream
+      String consoleOutput = PHPConsole.getStringFromStream(stream);
 
       // prints out the information
-      PHPConsole.write(compilerOutput);
-
-      // parse the buffer to find the errors and create markers
-    //  createMarkers(compilerOutput, fileToCompile);
+      PHPConsole.write(consoleOutput);
+      return consoleOutput;
 
     } catch (IOException e) {
-      // @todo should throw the exception again
+     
       System.err.println("Problem");
       e.printStackTrace();
-//    } catch (CoreException e) {
-//      e.printStackTrace();
-//      // @todo do something here !
+
     }
+    return "";
   }
 
   public void selectionChanged(IAction action, ISelection selection) {