changes for new Action
[phpeclipse.git] / net.sourceforge.phpeclipse.debug.ui / src / net / sourceforge / phpdt / internal / debug / ui / PHPDebugUiPlugin.java
1 package net.sourceforge.phpdt.internal.debug.ui;
2
3 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
4
5 import org.eclipse.core.resources.IWorkspace;
6 import org.eclipse.core.runtime.IPluginDescriptor;
7 import org.eclipse.core.runtime.IStatus;
8 import org.eclipse.core.runtime.Status;
9 import org.eclipse.ui.IWorkbenchPage;
10 import org.eclipse.ui.IWorkbenchWindow;
11 import org.eclipse.ui.plugin.AbstractUIPlugin;
12
13 public class PHPDebugUiPlugin extends AbstractUIPlugin {
14         public static final String PLUGIN_ID = "net.sourceforge.phpeclipse.debug.ui"; //$NON-NLS-1$
15         protected static PHPDebugUiPlugin plugin;
16
17         public PHPDebugUiPlugin(IPluginDescriptor descriptor) {
18                 super(descriptor);
19                 plugin = this;
20         }
21
22         public static IWorkbenchWindow getActiveWorkbenchWindow() {
23                 return getDefault().getWorkbench().getActiveWorkbenchWindow();
24         }
25
26         public static IWorkbenchPage getActivePage() {
27                 return PHPDebugUiPlugin.getActiveWorkbenchWindow().getActivePage();
28         }
29
30         public static PHPDebugUiPlugin getDefault() {
31                 return plugin;
32         }
33
34         public static IWorkspace getWorkspace() {
35                 return PHPeclipsePlugin.getWorkspace();
36         }
37
38         public static void log(IStatus status) {
39                 getDefault().getLog().log(status);
40         }
41
42         public static void log(Throwable e) {
43                 log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, PHPDebugUiMessages.getString("RdtDebugUiPlugin.internalErrorOccurred"), e)); //$NON-NLS-1$
44         }
45
46 //      protected void initializeDefaultPreferences(IPreferenceStore store) {
47 //              super.initializeDefaultPreferences(store);
48 //              
49 //              store.setDefault(RdtDebugUiConstants.PREFERENCE_KEYWORDS, getDefaultKeywords());
50 //      }
51
52 //      protected String getDefaultKeywords() {
53 //              return "class,def,end,if,module,new,puts,require,rescue,throw,while";
54 //      }
55 }