1 package net.sourceforge.phpdt.internal.debug.ui;
3 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
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;
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;
17 public PHPDebugUiPlugin(IPluginDescriptor descriptor) {
22 public static IWorkbenchWindow getActiveWorkbenchWindow() {
23 return getDefault().getWorkbench().getActiveWorkbenchWindow();
26 public static IWorkbenchPage getActivePage() {
27 return getDefault().getActiveWorkbenchWindow().getActivePage();
30 public static PHPDebugUiPlugin getDefault() {
34 public static IWorkspace getWorkspace() {
35 return PHPeclipsePlugin.getWorkspace();
38 public static void log(IStatus status) {
39 getDefault().getLog().log(status);
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$
46 // protected void initializeDefaultPreferences(IPreferenceStore store) {
47 // super.initializeDefaultPreferences(store);
49 // store.setDefault(RdtDebugUiConstants.PREFERENCE_KEYWORDS, getDefaultKeywords());
52 // protected String getDefaultKeywords() {
53 // return "class,def,end,if,module,new,puts,require,rescue,throw,while";