Added xampp start and stop action
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / actions / PHPStartApacheAction.java
index 72e579e..a87c8a1 100644 (file)
@@ -7,15 +7,16 @@ http://www.eclipse.org/legal/cpl-v10.html
 
 Contributors:
                IBM Corporation - Initial implementation
-               Klaus Hartlage - www.eclipseproject.de
+               www.phpeclipse.de
 **********************************************************************/
 package net.sourceforge.phpeclipse.actions;
 
 import java.text.MessageFormat;
 
 import net.sourceforge.phpdt.externaltools.launchConfigurations.ExternalToolsUtil;
+import net.sourceforge.phpeclipse.PHPConsole;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
-import net.sourceforge.phpeclipse.views.PHPConsole;
+import net.sourceforge.phpeclipse.ui.WebUI;
 
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.preference.IPreferenceStore;
@@ -29,7 +30,7 @@ public class PHPStartApacheAction implements IWorkbenchWindowActionDelegate {
   public void run(IAction action) {
     final IPreferenceStore store =
       PHPeclipsePlugin.getDefault().getPreferenceStore();
-    String documentRoot = store.getString(PHPeclipsePlugin.DOCUMENTROOT_PREF);
+    String documentRoot = store.getString(WebUI.PHP_DOCUMENTROOT_PREF);
     // replace backslash with slash in the DocumentRoot under Windows
     documentRoot = documentRoot.replace('\\', '/');
     String[] arguments = { documentRoot };
@@ -54,7 +55,7 @@ public class PHPStartApacheAction implements IWorkbenchWindowActionDelegate {
     String executable,
     String arguments,
     boolean background) {
-    PHPConsole console = PHPConsole.getInstance();
+    PHPConsole console = new PHPConsole();
     String consoleMessage;
     if (background) {
       consoleMessage =
@@ -73,7 +74,7 @@ public class PHPStartApacheAction implements IWorkbenchWindowActionDelegate {
           + " "
           + arguments;
     }
-    console.write(consoleMessage + "\n");
+    console.println(consoleMessage);
 
     ExternalToolsUtil.execute(command, executable, arguments, background);
   }