Refactory: remove unused classes, imports, fields and methods.
[phpeclipse.git] / net.sourceforge.phpeclipse.debug.ui / src / net / sourceforge / phpdt / internal / debug / ui / PHPDebugUiPlugin.java
index 79f91cb..8bdb623 100644 (file)
@@ -3,10 +3,9 @@ package net.sourceforge.phpdt.internal.debug.ui;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
 
 import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.runtime.IPluginDescriptor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
+//import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IWorkbenchPage;
@@ -16,10 +15,11 @@ import org.osgi.framework.BundleContext;
 
 public class PHPDebugUiPlugin extends AbstractUIPlugin {
        public static final String PLUGIN_ID = "net.sourceforge.phpeclipse.debug.ui"; //$NON-NLS-1$
+
        protected static PHPDebugUiPlugin plugin;
 
-       public PHPDebugUiPlugin(IPluginDescriptor descriptor) {
-               super(descriptor);
+       public PHPDebugUiPlugin() {
+               super();
                plugin = this;
        }
 
@@ -38,35 +38,34 @@ public class PHPDebugUiPlugin extends AbstractUIPlugin {
        public static IWorkspace getWorkspace() {
                return PHPeclipsePlugin.getWorkspace();
        }
-       
+
        /**
         * Convenience method which returns the unique identifier of this plugin.
         */
-//     public static String getUniqueIdentifier()
-//     {
-//             if ( getDefault() == null )
-//             {
-//                     // If the default instance is not yet initialized,
-//                     // return a static identifier. This identifier must
-//                     // match the plugin id defined in plugin.xml
-//                     return PLUGIN_ID;
-//             }
-//             return getDefault().getDescriptor().getUniqueIdentifier();
-//     }
-       
+       // public static String getUniqueIdentifier()
+       // {
+       // if ( getDefault() == null )
+       // {
+       // // If the default instance is not yet initialized,
+       // // return a static identifier. This identifier must
+       // // match the plugin id defined in plugin.xml
+       // return PLUGIN_ID;
+       // }
+       // return getDefault().getDescriptor().getUniqueIdentifier();
+       // }
        /**
-        * Returns the standard display to be used. The method first checks, if
-        * the thread calling this method has an associated display. If so, this
-        * display is returned. Otherwise the method returns the default display.
+        * Returns the standard display to be used. The method first checks, if the
+        * thread calling this method has an associated display. If so, this display
+        * is returned. Otherwise the method returns the default display.
         */
        public static Display getStandardDisplay() {
                Display display;
-               display= Display.getCurrent();
+               display = Display.getCurrent();
                if (display == null)
-                       display= Display.getDefault();
-               return display;         
+                       display = Display.getDefault();
+               return display;
        }
-       
+
        /**
         * Returns the active workbench shell or <code>null</code> if none
         * 
@@ -79,34 +78,33 @@ public class PHPDebugUiPlugin extends AbstractUIPlugin {
                }
                return null;
        }
-       
-       public static void errorDialog( String message, IStatus status )
-               {
-                       log( status );
-                       Shell shell = getActiveWorkbenchShell();
-                       if ( shell != null )
-                       {
-                               ErrorDialog.openError( shell, "Error", message, status );
-                       }
-               }
 
-               public static void errorDialog( String message, Throwable t )
-               {
-                       log( t );
-                       Shell shell = getActiveWorkbenchShell();
-                       if ( shell != null )
-                       {
-                               IStatus status = new Status( IStatus.ERROR, PLUGIN_ID, /*ICDebugUIConstants.INTERNAL_ERROR*/ 150, t.getMessage(), null ); //$NON-NLS-1$ 
-                               ErrorDialog.openError( shell, "Error", message, status );
-                       }
-               }                       
+//     public static void errorDialog(String message, IStatus status) {
+//             log(status);
+//             Shell shell = getActiveWorkbenchShell();
+//             if (shell != null) {
+//                     ErrorDialog.openError(shell, "Error", message, status);
+//             }
+//     }
+
+//     public static void errorDialog(String message, Throwable t) {
+//             log(t);
+//             Shell shell = getActiveWorkbenchShell();
+//             if (shell != null) {
+//                     IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, /* ICDebugUIConstants.INTERNAL_ERROR */
+//                                     150, t.getMessage(), null); //$NON-NLS-1$       
+//                     ErrorDialog.openError(shell, "Error", message, status);
+//             }
+//     }
 
        public static void log(IStatus status) {
                getDefault().getLog().log(status);
        }
 
        public static void log(Throwable e) {
-               log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, PHPDebugUiMessages.getString("RdtDebugUiPlugin.internalErrorOccurred"), e)); //$NON-NLS-1$
+               log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR,
+                               PHPDebugUiMessages
+                                               .getString("RdtDebugUiPlugin.internalErrorOccurred"), e)); //$NON-NLS-1$
        }
 
        /**
@@ -122,14 +120,15 @@ public class PHPDebugUiPlugin extends AbstractUIPlugin {
        public void stop(BundleContext context) throws Exception {
                super.stop(context);
        }
-       
-//     protected void initializeDefaultPreferences(IPreferenceStore store) {
-//             super.initializeDefaultPreferences(store);
-//             
-//             store.setDefault(RdtDebugUiConstants.PREFERENCE_KEYWORDS, getDefaultKeywords());
-//     }
 
-//     protected String getDefaultKeywords() {
-//             return "class,def,end,if,module,new,puts,require,rescue,throw,while";
-//     }
+       // protected void initializeDefaultPreferences(IPreferenceStore store) {
+       // super.initializeDefaultPreferences(store);
+       //              
+       // store.setDefault(RdtDebugUiConstants.PREFERENCE_KEYWORDS,
+       // getDefaultKeywords());
+       // }
+
+       // protected String getDefaultKeywords() {
+       // return "class,def,end,if,module,new,puts,require,rescue,throw,while";
+       // }
 }