Updated .cvsignore to be more minimalist, and only excludes the bin dir
[phpeclipse.git] / net.sourceforge.phpeclipse.phphelp / src / net / sourceforge / phpdt / phphelp / PHPHelpPlugin.java
index 3c24502..e388fb1 100644 (file)
@@ -43,14 +43,15 @@ public class PHPHelpPlugin extends AbstractUIPlugin {
 
        public static final String HTTP_QUERY = "HTTP Query";
 
-       public final static String PREF_STRING_CONFIGURATIONS = "__configurations";
+       public final static String PREF_STRING_CONFIGURATIONS = "__configurations1";
 
        public final static String CONFIG_MEMENTO = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
                        + "<configurations>"
-                       + "<config name=\"PHP Online Manual\" type-id=\"HTTP Query\" url=\"http://www.php.net/manual/en/function.$php.selection.php\"/>"
-                       + "<config name=\"Google Search\" type-id=\"HTTP Query\" url=\"http://www.google.com/search?q=$text.selection\"/>"
-                       + "<config name=\"Koders.com Search\" type-id=\"HTTP Query\" url=\"http://koders.com/?s=$text.selection\"/>"
-                       + "<config name=\"Leo.org Translation\" type-id=\"HTTP Query\" url=\"http://dict.leo.org/?search=$text.selection\"/>"
+                       + "<config name=\"PHP Manual\" type-id=\"HTTP Query\" url=\"http://www.php.net/manual/en/function.$php.selection.php\"/>"
+                       + "<config name=\"Google.com\" type-id=\"HTTP Query\" url=\"http://www.google.com/search?q=$text.selection\"/>"
+                       + "<config name=\"Koders.com\" type-id=\"HTTP Query\" url=\"http://koders.com/?s=$text.selection\"/>"
+                       + "<config name=\"Leo.org Deutsch/English\" type-id=\"HTTP Query\" url=\"http://dict.leo.org/?search=$text.selection\"/>"
+                       + "<config name=\"Localhost\" type-id=\"HTTP Query\" url=\"http://localhost\"/>"
                        + "</configurations>";
 
        public static final ArrayList CONFIGURATION_TYPES = new ArrayList();
@@ -65,6 +66,7 @@ public class PHPHelpPlugin extends AbstractUIPlugin {
        private static PHPHelpPlugin plugin;
 
        private static ConfigurationManager manager;
+
        /**
         * The constructor.
         */
@@ -92,7 +94,8 @@ public class PHPHelpPlugin extends AbstractUIPlugin {
        }
 
        private IWorkbenchPage internalGetActivePage() {
-               IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+               IWorkbenchWindow window = PlatformUI.getWorkbench()
+                               .getActiveWorkbenchWindow();
                if (window != null)
                        return window.getActivePage();
                return null;
@@ -111,12 +114,14 @@ public class PHPHelpPlugin extends AbstractUIPlugin {
        }
 
        public static void log(int severity, String message) {
-               Status status = new Status(severity, PLUGIN_ID, IStatus.OK, message, null);
+               Status status = new Status(severity, PLUGIN_ID, IStatus.OK, message,
+                               null);
                log(status);
        }
 
        public static void log(Throwable e) {
-               log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "PHPeclipsePlugin.internalErrorOccurred", e)); //$NON-NLS-1$
+               log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR,
+                               "PHPeclipsePlugin.internalErrorOccurred", e)); //$NON-NLS-1$
        }
 
        public static boolean isDebug() {
@@ -125,13 +130,17 @@ public class PHPHelpPlugin extends AbstractUIPlugin {
 
        protected void initializeDefaultPreferences(IPreferenceStore store) {
                store.setDefault(PREF_STRING_CONFIGURATIONS, CONFIG_MEMENTO);
+               addType(HTTP_QUERY);
                // windows preferences:
                String windowsSystem = Platform.getWS();
 
                if (windowsSystem.equals(Platform.WS_WIN32)) {
                        store.setDefault(PHP_CHM_ENABLED, "false");
-                       store.setDefault(PHP_CHM_FILE, "c:\\wampp2\\php\\php_manual_en.chm");
-                       store.setDefault(PHP_CHM_COMMAND, "hh.exe \"mk:@MSITStore:{0}::/en/function.{1}.html\"");
+                       store
+                                       .setDefault(PHP_CHM_FILE,
+                                                       "c:\\wampp2\\php\\php_manual_en.chm");
+                       store.setDefault(PHP_CHM_COMMAND,
+                                       "hh.exe \"mk:@MSITStore:{0}::/en/function.{1}.html\"");
                } else {
                        store.setDefault(PHP_CHM_ENABLED, "false");
                        store.setDefault(PHP_CHM_FILE, "");
@@ -201,10 +210,10 @@ public class PHPHelpPlugin extends AbstractUIPlugin {
 
        /**
         * Returns the translated String found with the given key.
-        *
+        * 
         * @return java.lang.String
         * @param key
-        *          java.lang.String
+        *            java.lang.String
         */
        public static String getResource(String key) {
                try {
@@ -216,7 +225,7 @@ public class PHPHelpPlugin extends AbstractUIPlugin {
 
        /**
         * Return a list of all the existing configurations.
-        *
+        * 
         * @return java.util.List
         */
        public static List getConfigurations() {
@@ -225,7 +234,7 @@ public class PHPHelpPlugin extends AbstractUIPlugin {
 
        /**
         * Create a new monitor.
-        *
+        * 
         * @return working copy
         */
        public static IConfigurationWorkingCopy createConfiguration() {