1 package net.sourceforge.phpeclipse;
3 import org.eclipse.ui.plugin.*;
4 import org.eclipse.core.runtime.*;
5 import org.eclipse.core.resources.*;
9 * The main plugin class to be used in the desktop.
11 public class PHPeclipsePlugin extends AbstractUIPlugin {
12 //The shared instance.
13 private static PHPeclipsePlugin plugin;
15 private ResourceBundle resourceBundle;
20 public PHPeclipsePlugin(IPluginDescriptor descriptor) {
25 ResourceBundle.getBundle(
26 "net.sourceforge.PHPeclipsePluginResources");
27 } catch (MissingResourceException x) {
28 resourceBundle = null;
33 * Returns the shared instance.
35 public static PHPeclipsePlugin getDefault() {
40 * Returns the workspace instance.
42 public static IWorkspace getWorkspace() {
43 return ResourcesPlugin.getWorkspace();
47 * Returns the string from the plugin's resource bundle,
48 * or 'key' if not found.
50 public static String getResourceString(String key) {
51 ResourceBundle bundle =
52 PHPeclipsePlugin.getDefault().getResourceBundle();
54 return bundle.getString(key);
55 } catch (MissingResourceException e) {
61 * Returns the plugin's resource bundle,
63 public ResourceBundle getResourceBundle() {
64 return resourceBundle;