* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
- *
+ *
* Contributors:
* Christopher Lenz - initial implementation
- *
- * $Id: WebUI.java,v 1.2 2004-09-03 17:30:32 jsurfer Exp $
+ *
+ * $Id: WebUI.java,v 1.6 2005-10-13 18:38:19 axelcl Exp $
*/
package net.sourceforge.phpeclipse.ui;
/** 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 ----------------------------------------------------------
/**
/**
* Returns this plug-in's context type registry.
- *
+ *
* @return the context type registry for this plug-in instance
*/
public ContextTypeRegistry getContextTypeRegistry() {
/**
* Returns an image descriptor for the image corresponding to the specified key (which is the name of the image file).
- *
+ *
* @param key
* The key of the image
* @return The descriptor for the requested image, or <code>null</code> if the image could not be found
/**
* Returns this plug-in's template store.
- *
+ *
* @return the template store of this plug-in instance
*/
public TemplateStore getTemplateStore() {
protected void initializeDefaultPreferences(IPreferenceStore store) {
store.setDefault(PHP_LOCALHOST_PREF, "http://localhost");
store.setDefault(PHP_DOCUMENTROOT_PREF, getWorkspace().getRoot().getLocation().toString());
- store.setDefault(PHP_BOOKMARK_DEFAULT, "");
+// store.setDefault(PHP_BOOKMARK_DEFAULT, "");
store.setDefault(PHP_AUTO_PREVIEW_DEFAULT, "true");
store.setDefault(PHP_BRING_TO_TOP_PREVIEW_DEFAULT, "true");
- store.setDefault(PHP_SHOW_HTML_FILES_LOCAL, "true");
+// store.setDefault(PHP_SHOW_HTML_FILES_LOCAL, "true");
+// store.setDefault(PHP_SHOW_XML_FILES_LOCAL, "false");
}
+
/*
* @see AbstractUIPlugin#initializeImageRegistry(ImageRegistry)
*/
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