X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/WebUI.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/WebUI.java index b45dc5f..eb7b852 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/WebUI.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/WebUI.java @@ -8,7 +8,7 @@ * Contributors: * Christopher Lenz - initial implementation * - * $Id: WebUI.java,v 1.3 2004-09-03 19:58:36 jsurfer Exp $ + * $Id: WebUI.java,v 1.4 2005-02-12 23:21:46 axelcl Exp $ */ package net.sourceforge.phpeclipse.ui; @@ -53,17 +53,22 @@ public class WebUI extends AbstractUIPlugin implements IPreferenceConstants { /** The shared instance. */ private static WebUI plugin; + public static IWorkbenchPage getActivePage() { return getDefault().internalGetActivePage(); } + private IWorkbenchPage internalGetActivePage() { + return getWorkbench().getActiveWorkbenchWindow().getActivePage(); + } + public static Shell getActiveWorkbenchShell() { return getActiveWorkbenchWindow().getShell(); } + public static IWorkbenchWindow getActiveWorkbenchWindow() { return getDefault().getWorkbench().getActiveWorkbenchWindow(); } - // Public Methods ---------------------------------------------------------- /** @@ -157,6 +162,7 @@ public class WebUI extends AbstractUIPlugin implements IPreferenceConstants { store.setDefault(PHP_SHOW_HTML_FILES_LOCAL, "true"); store.setDefault(PHP_SHOW_XML_FILES_LOCAL, "false"); } + /* * @see AbstractUIPlugin#initializeImageRegistry(ImageRegistry) */ @@ -164,10 +170,10 @@ public class WebUI extends AbstractUIPlugin implements IPreferenceConstants { reg.put(ICON_OVERLAY_ERROR, getImageDescriptor(ICON_OVERLAY_ERROR)); reg.put(ICON_OVERLAY_WARNING, getImageDescriptor(ICON_OVERLAY_WARNING)); } - private IWorkbenchPage internalGetActivePage() { - IWorkbenchWindow window = getWorkbench().getActiveWorkbenchWindow(); - if (window != null) - return window.getActivePage(); - return null; - } + // private IWorkbenchPage internalGetActivePage() { + // IWorkbenchWindow window = getWorkbench().getActiveWorkbenchWindow(); + // if (window != null) + // return window.getActivePage(); + // return null; + // } } \ No newline at end of file