1 package net.sourceforge.phpdt.internal.debug.ui;
3 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
4 import org.eclipse.core.resources.IWorkspace;
5 import org.eclipse.core.runtime.IPluginDescriptor;
6 import org.eclipse.core.runtime.IStatus;
7 import org.eclipse.core.runtime.Status;
8 import org.eclipse.jface.preference.IPreferenceStore;
9 import org.eclipse.ui.IWorkbenchPage;
10 import org.eclipse.ui.IWorkbenchWindow;
11 import org.eclipse.ui.plugin.AbstractUIPlugin;
12 import net.sourceforge.phpdt.debug.ui.PHPDebugUiConstants;
14 public class PHPDebugUiPlugin extends AbstractUIPlugin {
15 public static final String PLUGIN_ID = "net.sourceforge.phpeclipse.debug.ui"; //$NON-NLS-1$
16 protected static PHPDebugUiPlugin plugin;
18 public PHPDebugUiPlugin(IPluginDescriptor descriptor) {
23 public static IWorkbenchWindow getActiveWorkbenchWindow() {
24 return getDefault().getWorkbench().getActiveWorkbenchWindow();
27 public static IWorkbenchPage getActivePage() {
28 return getDefault().getActiveWorkbenchWindow().getActivePage();
31 public static PHPDebugUiPlugin getDefault() {
35 public static IWorkspace getWorkspace() {
36 return PHPeclipsePlugin.getWorkspace();
39 public static void log(IStatus status) {
40 getDefault().getLog().log(status);
43 public static void log(Throwable e) {
44 log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, PHPDebugUiMessages.getString("RdtDebugUiPlugin.internalErrorOccurred"), e)); //$NON-NLS-1$
47 // protected void initializeDefaultPreferences(IPreferenceStore store) {
48 // super.initializeDefaultPreferences(store);
50 // store.setDefault(RdtDebugUiConstants.PREFERENCE_KEYWORDS, getDefaultKeywords());
53 // protected String getDefaultKeywords() {
54 // return "class,def,end,if,module,new,puts,require,rescue,throw,while";