misc
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / PHPeclipsePlugin.java
index 72d3508..ac785cf 100644 (file)
@@ -5,9 +5,6 @@
  which accompanies this distribution, and is available at
  http://www.eclipse.org/legal/cpl-v10.html
 
- Contributors:
- IBM Corporation - Initial implementation
- Klaus Hartlage - www.eclipseproject.de
  **********************************************************************/
 package net.sourceforge.phpeclipse;
 
@@ -304,6 +301,7 @@ public class PHPeclipsePlugin extends AbstractUIPlugin implements IPreferenceCon
     plugin = this;
     setJVM();
     externalTools = new ExternalToolsPlugin();
+    
     //    try {
     //      resourceBundle =
     // ResourceBundle.getBundle("net.sourceforge.PHPeclipsePluginResources");
@@ -690,8 +688,9 @@ public class PHPeclipsePlugin extends AbstractUIPlugin implements IPreferenceCon
     //    store.setDefault(PHP_LOCALHOST_PREF, "http://localhost");
     //    store.setDefault(PHP_DOCUMENTROOT_PREF, getWorkspace().getRoot()
     //        .getLocation().toString());
+    
 
-    //    store.setDefault(SHOW_EXTERNAL_PREVIEW_PREF, "true");
+//    store.setDefault(SHOW_EXTERNAL_PREVIEW_PREF, "true");
 //    store.setDefault(USE_EXTERNAL_BROWSER_PREF, "false");
     store.setDefault(SHOW_OUTPUT_IN_CONSOLE, "true");
     store.setDefault(PHP_OBFUSCATOR_DEFAULT, "c:\\temp");
@@ -716,6 +715,32 @@ public class PHPeclipsePlugin extends AbstractUIPlugin implements IPreferenceCon
     //  if ((jvm == WINDOWS_9x) || (jvm == WINDOWS_NT)) {
     // 
     if (windowsSystem.equals(Platform.WS_WIN32)) {
+//      String workspaceLocation = getWorkspace().getRoot().getLocation().toString();
+//      String baseLocation = null;
+//      int index = workspaceLocation.lastIndexOf('/');
+//      if (index>0) {
+//        index = workspaceLocation.lastIndexOf('/', index-1);
+//        if (index>0) {
+//          baseLocation = workspaceLocation.substring(0,index);
+//        }
+//      }
+//      if (baseLocation!=null) {
+//        String xampp_start = baseLocation + "/xampp_start.exe";
+//        String xampp_stop = baseLocation + "/xampp_stop.exe";
+//        File testFile = new File(xampp_start);
+//        if (testFile.exists()) {
+//          System.out.println(xampp_start);
+//          System.out.println(xampp_stop);
+//        } else {
+//          xampp_start = "c:\\xampp\\xampp_start.exe";
+//          xampp_stop = "c:\\xampp\\xampp_stop.exe";
+//          testFile = new File(xampp_start);
+//          if (testFile.exists()) {
+//            System.out.println(xampp_start);
+//            System.out.println(xampp_stop);
+//          }
+//        }
+//      }
       store.setDefault(PHP_RUN_PREF, "c:\\apache\\php\\php.exe");
       store.setDefault(EXTERNAL_PARSER_PREF, "c:\\apache\\php\\php -l -f {0}");
       store.setDefault(MYSQL_RUN_PREF, "c:\\apache\\mysql\\bin\\mysqld-nt.exe");
@@ -1127,7 +1152,7 @@ public class PHPeclipsePlugin extends AbstractUIPlugin implements IPreferenceCon
    */
   public void start(BundleContext context) throws Exception {
     super.start(context);
-
+    
     //         JavaCore.start(this, context);
     final JavaModelManager manager = JavaModelManager.getJavaModelManager();
     try {