Committing more fixes for bug #1839622 RSE Path error. This will clean up php files...
[phpeclipse.git] / net.sourceforge.phpeclipse.externaltools / src / net / sourceforge / phpdt / externaltools / actions / PHPStartXAMPPAction.java
index d51afd3..49d5a50 100644 (file)
@@ -11,7 +11,6 @@ import java.io.File;
 
 import net.sourceforge.phpdt.externaltools.launchConfigurations.ExternalToolsUtil;
 import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
-import net.sourceforge.phpeclipse.externaltools.PHPConsole;
 
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.preference.IPreferenceStore;
@@ -20,54 +19,61 @@ import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.IWorkbenchWindowActionDelegate;
 
 public class PHPStartXAMPPAction implements IWorkbenchWindowActionDelegate {
-  protected IWorkbenchWindow activeWindow = null;
+       protected IWorkbenchWindow activeWindow = null;
 
-  public void run(IAction action) {
-    final IPreferenceStore store = ExternalToolsPlugin.getDefault().getPreferenceStore();
-    String executable = store.getString(ExternalToolsPlugin.XAMPP_START_PREF);
-    String workingDirectory = null;
-    if (executable != null && executable.length() > 0) {
-      int index = executable.lastIndexOf(File.separatorChar);
-      if (index > 0) {
-        workingDirectory = executable.substring(0, index);
-      }
-    }
-    execute("xampp_start", executable, workingDirectory, true);
-  }
+       public void run(IAction action) {
+               final IPreferenceStore store = ExternalToolsPlugin.getDefault()
+                               .getPreferenceStore();
+               String executable = store
+                               .getString(ExternalToolsPlugin.XAMPP_START_PREF);
+               String workingDirectory = null;
+               if (executable != null && executable.length() > 0) {
+                       int index = executable.lastIndexOf(File.separatorChar);
+                       if (index > 0) {
+                               workingDirectory = executable.substring(0, index);
+                       }
+               }
+               execute("xampp_start", executable, workingDirectory, true);
+       }
 
-  /**
-   * Executes an external progam and saves the LaunchConfiguration under external tools
-   * 
-   * @param command
-   *          external tools command name
-   * @param executable
-   *          executable path i.e.c:\apache\apache.exe
-   * @param background
-   *          run this configuration in background mode
-   */
-  public static void execute(String command, String executable, String workingDirectory, boolean background) {
-//    PHPConsole console = new PHPConsole();
-//    String consoleMessage;
-//    if (background) {
-//      consoleMessage = "run in background mode-" + command + ": " + executable;
-//    } else {
-//      consoleMessage = "run in foreground mode-" + command + ": " + executable;
-//    }
-//    console.println(consoleMessage);
+       /**
+        * Executes an external progam and saves the LaunchConfiguration under
+        * external tools
+        * 
+        * @param command
+        *            external tools command name
+        * @param executable
+        *            executable path i.e.c:\apache\apache.exe
+        * @param background
+        *            run this configuration in background mode
+        */
+       public static void execute(String command, String executable,
+                       String workingDirectory, boolean background) {
+               // PHPConsole console = new PHPConsole();
+               // String consoleMessage;
+               // if (background) {
+               // consoleMessage = "run in background mode-" + command + ": " +
+               // executable;
+               // } else {
+               // consoleMessage = "run in foreground mode-" + command + ": " +
+               // executable;
+               // }
+               // console.println(consoleMessage);
 
-    ExternalToolsUtil.execute(command, executable, workingDirectory, null, background);
-  }
+               ExternalToolsUtil.execute(command, executable, workingDirectory, null,
+                               background);
+       }
 
-  public void selectionChanged(IAction action, ISelection selection) {
+       public void selectionChanged(IAction action, ISelection selection) {
 
-  }
+       }
 
-  public void init(IWorkbenchWindow window) {
-    this.activeWindow = window;
-  }
+       public void init(IWorkbenchWindow window) {
+               this.activeWindow = window;
+       }
 
-  public void dispose() {
+       public void dispose() {
 
-  }
+       }
 
 }
\ No newline at end of file