Added a constant to choose the parser
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / PHPeclipsePlugin.java
index 0cb4ae8..480c47a 100644 (file)
@@ -14,6 +14,8 @@ package net.sourceforge.phpeclipse;
 import net.sourceforge.phpdt.internal.ui.preferences.TemplatePreferencePage;
 import net.sourceforge.phpdt.internal.ui.viewsupport.ImageDescriptorRegistry;
 import net.sourceforge.phpeclipse.phpeditor.PHPDocumentProvider;
+import net.sourceforge.phpeclipse.phpeditor.PHPSyntaxRdr;
+import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider;
 import net.sourceforge.phpeclipse.resourcesview.PHPElement;
 import net.sourceforge.phpeclipse.resourcesview.PHPElementAdapterFactory;
 import net.sourceforge.phpeclipse.resourcesview.ResourceAdapterFactory;
@@ -36,9 +38,6 @@ import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 
-import net.sourceforge.phpeclipse.phpeditor.PHPSyntaxRdr;
-import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider;
-
 /**
  * The main plugin class to be used in the desktop.
  */
@@ -59,7 +58,14 @@ public class PHPeclipsePlugin extends AbstractUIPlugin implements IPreferenceCon
    */
   public static final String PLUGIN_ID = "net.sourceforge.phpeclipse"; //$NON-NLS-1$
   public final static String PHP_NATURE_ID = PLUGIN_ID + ".phpnature";
-  public static final String PHP_RESOURCES_VIEW_ID = PLUGIN_ID + ".resourcesview.ViewPHPResources"; //$NON-NLS-1$
+ // public static final String PHP_RESOURCES_VIEW_ID = PLUGIN_ID + ".resourcesview.ViewPHPResources"; //$NON-NLS-1$
+  public static final String PHP_CODING_ACTION_SET_ID = PLUGIN_ID + ".ui.CodingActionSet"; //$NON-NLS-1$
+
+  public static final String PHPPARSER_NEW = "test.PHPParser";
+  public static final String PHPPARSER_ORIGINAL = "net.sourceforge.phpdt.internal.compiler.parser.Parser";
+
+  /** Change this if you want to switch PHP Parser) */
+  public static final String PHPPARSER  = PHPPARSER_ORIGINAL;
 
   //The shared instance.
   private static PHPeclipsePlugin plugin;
@@ -69,7 +75,7 @@ public class PHPeclipsePlugin extends AbstractUIPlugin implements IPreferenceCon
   private ImageDescriptorRegistry fImageDescriptorRegistry;
   private PHPDocumentProvider fCompilationUnitDocumentProvider;
   /**
-  * The Java virtual machine that we are running on.  
+  * The Java virtual machine that we are running on.
   */
   private static int jvm;
 
@@ -200,13 +206,13 @@ public class PHPeclipsePlugin extends AbstractUIPlugin implements IPreferenceCon
   //  public static void logErrorStatus(String message, IStatus status) {
   //    if (status == null) {
   //      logErrorMessage(message);
-  //      return; 
+  //      return;
   //    }
   //    MultiStatus multi= new MultiStatus(getPluginId(), JavaStatusConstants.INTERNAL_ERROR, message, null);
   //    multi.add(status);
   //    log(multi);
   //  }
-  //  
+  //
   //  public static void log(Throwable e) {
   //    log(new Status(IStatus.ERROR, getPluginId(), JavaStatusConstants.INTERNAL_ERROR, JavaUIMessages.getString("JavaPlugin.internal_error"), e)); //$NON-NLS-1$
   //  }
@@ -309,11 +315,12 @@ public class PHPeclipsePlugin extends AbstractUIPlugin implements IPreferenceCon
     store.setDefault(RESOURCE_BUNDLE_EN_GB, "true");
     store.setDefault(RESOURCE_BUNDLE_DE, "false");
     store.setDefault(RESOURCE_BUNDLE_FR, "false");
+    store.setDefault(RESOURCE_BUNDLE_ES, "false");
 
     store.setDefault(PHP_OUTLINE_CLASS, "true"); //$NON-NLS-1$
     store.setDefault(PHP_OUTLINE_FUNC, "true"); //$NON-NLS-1$
-    store.setDefault(PHP_OUTLINE_VAR, "true"); //$NON-NLS-1$ 
-  
+    store.setDefault(PHP_OUTLINE_VAR, "true"); //$NON-NLS-1$
+
     TemplatePreferencePage.initDefaults(store);
     new PHPSyntaxRdr(); //this will initialize the static fields in the syntaxrdr class
   }