1) Fixed the 'Save Failed' issue by uncommenting the incriminating code from showPrev...
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpeclipse / ui / WebUI.java
index ef6360d..816f5e9 100644 (file)
@@ -8,7 +8,7 @@
  * Contributors:
  *     Christopher Lenz - initial implementation
  *
- * $Id: WebUI.java,v 1.9 2007-08-20 02:33:07 toshihiro Exp $
+ * $Id: WebUI.java,v 1.11 2007-11-08 01:37:06 scorphus Exp $
  */
 
 package net.sourceforge.phpeclipse.ui;
@@ -16,10 +16,10 @@ package net.sourceforge.phpeclipse.ui;
 import java.io.IOException;
 import java.net.URL;
 
-import net.sourceforge.phpeclipse.ui.templates.template.HTMLContextType;
-import net.sourceforge.phpeclipse.ui.templates.template.JSContextType;
-import net.sourceforge.phpeclipse.ui.templates.template.SmartyContextType;
-import net.sourceforge.phpeclipse.ui.templates.template.XMLContextType;
+import net.sourceforge.phpeclipse.ui.templates.template.HTMLTemplateContextType;
+import net.sourceforge.phpeclipse.ui.templates.template.JSTemplateContextType;
+import net.sourceforge.phpeclipse.ui.templates.template.SmartyTemplateContextType;
+import net.sourceforge.phpeclipse.ui.templates.template.XMLTemplateContextType;
 
 import org.eclipse.core.resources.IWorkspace;
 import org.eclipse.core.resources.ResourcesPlugin;
@@ -42,7 +42,7 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
  */
 public class WebUI extends AbstractUIPlugin implements IPreferenceConstants {
 
-       private static final String PLUGIN_ID = "net.sourceforge.phpeclipse.ui";
+       public static final String PLUGIN_ID = "net.sourceforge.phpeclipse.ui";
 
        private static final String CUSTOM_TEMPLATES_KEY = "net.sourceforge.phpeclipse.ui.templates"; //$NON-NLS-1$
 
@@ -113,10 +113,10 @@ public class WebUI extends AbstractUIPlugin implements IPreferenceConstants {
                if (fRegistry == null) {
                        // create an configure the contexts available in the editor
                        fRegistry = new ContributionContextTypeRegistry();
-                       fRegistry.addContextType(XMLContextType.XML_CONTEXT_TYPE);
-                       fRegistry.addContextType(HTMLContextType.HTML_CONTEXT_TYPE);
-                       fRegistry.addContextType(SmartyContextType.SMARTY_CONTEXT_TYPE);
-                       fRegistry.addContextType(JSContextType.JS_CONTEXT_TYPE);
+                       fRegistry.addContextType(XMLTemplateContextType.XML_CONTEXT_TYPE);
+                       fRegistry.addContextType(HTMLTemplateContextType.HTML_CONTEXT_TYPE);
+                       fRegistry.addContextType(SmartyTemplateContextType.SMARTY_CONTEXT_TYPE);
+                       fRegistry.addContextType(JSTemplateContextType.JS_CONTEXT_TYPE);
                }
                return fRegistry;
        }
@@ -168,11 +168,12 @@ public class WebUI extends AbstractUIPlugin implements IPreferenceConstants {
        protected void initializeDefaultPreferences(IPreferenceStore store) {
                store.setDefault(PHP_LOCALHOST_PREF, "http://localhost");
                store.setDefault(PHP_DOCUMENTROOT_PREF, getWorkspace().getRoot()
-                               .getLocation().toString());
+                               .getFullPath().toString());
                // store.setDefault(PHP_BOOKMARK_DEFAULT, "");
 
                store.setDefault(PHP_AUTO_PREVIEW_DEFAULT, "false");
                store.setDefault(PHP_BRING_TO_TOP_PREVIEW_DEFAULT, "false");
+               store.setDefault(PHP_STICKY_BROWSER_URL_DEFAULT, "false");
                // store.setDefault(PHP_SHOW_HTML_FILES_LOCAL, "true");
                // store.setDefault(PHP_SHOW_XML_FILES_LOCAL, "false");
        }
@@ -197,7 +198,7 @@ public class WebUI extends AbstractUIPlugin implements IPreferenceConstants {
        }
 
        public static void log(Throwable e) {
-               log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, e
-                               .getLocalizedMessage(), e));
+               log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, ""
+                               + e.getLocalizedMessage(), e));
        }
 }
\ No newline at end of file