FileDocCategorySizeDatePackage
MenuPlugInPlugin.javaAPI DocExample1485Thu Mar 18 10:01:46 GMT 2004org.cookbook.ch12.MenuPlugIn

MenuPlugInPlugin

public class MenuPlugInPlugin extends AbstractUIPlugin
The main plugin class to be used in the desktop.

Fields Summary
private static MenuPlugInPlugin
plugin
private ResourceBundle
resourceBundle
Constructors Summary
public MenuPlugInPlugin(IPluginDescriptor descriptor)
The constructor.

		super(descriptor);
		plugin = this;
		try {
			resourceBundle= ResourceBundle.getBundle("org.cookbook.ch12.MenuPlugIn.MenuPlugInPluginResources");
		} catch (MissingResourceException x) {
			resourceBundle = null;
		}
	
Methods Summary
public static org.cookbook.ch12.MenuPlugIn.MenuPlugInPlugingetDefault()
Returns the shared instance.

		return plugin;
	
public java.util.ResourceBundlegetResourceBundle()
Returns the plugin's resource bundle,

		return resourceBundle;
	
public static java.lang.StringgetResourceString(java.lang.String key)
Returns the string from the plugin's resource bundle, or 'key' if not found.

		ResourceBundle bundle= MenuPlugInPlugin.getDefault().getResourceBundle();
		try {
			return bundle.getString(key);
		} catch (MissingResourceException e) {
			return key;
		}
	
public static IWorkspacegetWorkspace()
Returns the workspace instance.

		return ResourcesPlugin.getWorkspace();