1) Reintroduced PHPPerspectiveFactory (was lost with refactoring).
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpeclipse / ui / WebUI.java
index 4dbdae9..fb23514 100644 (file)
@@ -131,7 +131,13 @@ public class WebUI extends AbstractUIPlugin implements IPreferenceConstants {
 
        public static final String EDITOR_ID = WebUI.PLUGIN_ID + ".PHPUnitEditor";
 
-       private static final String CUSTOM_TEMPLATES_KEY = "net.sourceforge.phpeclipse.ui.templates"; //$NON-NLS-1$
+
+       /**
+        * The key to store customized templates.
+        * 
+        * @since 3.0
+        */
+       private static final String TEMPLATES_KEY = "net.sourceforge.phpdt.ui.text.custom_templates"; //$NON-NLS-1$
 
        /**
         * The key to store customized code templates.
@@ -139,6 +145,19 @@ public class WebUI extends AbstractUIPlugin implements IPreferenceConstants {
         * @since 3.0
         */
        private static final String CODE_TEMPLATES_KEY = "net.sourceforge.phpdt.ui.text.custom_code_templates"; //$NON-NLS-1$
+
+       
+       
+       
+       
+    private static final String CUSTOM_TEMPLATES_KEY = "net.sourceforge.phpeclipse.ui.templates"; //$NON-NLS-1$
+
+       /**
+        * The key to store customized code templates.
+        * 
+        * @since 3.0
+        */
+//     private static final String CODE_TEMPLATES_KEY = "net.sourceforge.phpdt.ui.text.custom_code_templates"; //$NON-NLS-1$
        /**
         * The maximum number of allowed proposals by category
         */
@@ -309,8 +328,8 @@ public class WebUI extends AbstractUIPlugin implements IPreferenceConstants {
         */
        public TemplateStore getTemplateStore() {
                if (fStore == null) {
-                       fStore = new ContributionTemplateStore(getContextTypeRegistry(),
-                                       getDefault().getPreferenceStore(), CUSTOM_TEMPLATES_KEY);
+                       fStore = new ContributionTemplateStore(/*getContextTypeRegistry()*/getTemplateContextRegistry(),
+                                       getDefault().getPreferenceStore(), /*CUSTOM_*/TEMPLATES_KEY);
                        try {
                                fStore.load();
                        } catch (IOException e) {
@@ -781,8 +800,8 @@ public class WebUI extends AbstractUIPlugin implements IPreferenceConstants {
                                                                | IResourceChangeEvent.PRE_DELETE
                                                                | IResourceChangeEvent.PRE_CLOSE);
        
-                               ISavedState savedState = workspace.addSaveParticipant(
-                                               /*PHPeclipsePlugin*/WebUI.this, modelManager);
+//                             ISavedState savedState = workspace.addSaveParticipant(
+//                                             /*PHPeclipsePlugin*/WebUI.this, modelManager);
        
                                WorkspaceJob processSavedState = new WorkspaceJob(
                                                Util.bind("savedState.jobName")) { //$NON-NLS-1$