1 package net.sourceforge.phpeclipse.phpmanual;
3 import java.util.MissingResourceException;
5 import org.eclipse.jface.resource.ImageDescriptor;
6 import org.eclipse.ui.plugin.AbstractUIPlugin;
7 import org.osgi.framework.BundleContext;
10 * The activator class controls the plug-in life cycle
12 public class PHPManualUIPlugin extends AbstractUIPlugin {
15 public static final String PLUGIN_ID = "net.sourceforge.phpeclipse.phpmanual";
17 // The shared instance
18 private static PHPManualUIPlugin plugin;
23 public PHPManualUIPlugin() {
29 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
31 public void start(BundleContext context) throws Exception {
37 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
39 public void stop(BundleContext context) throws Exception {
45 * Returns the shared instance
47 * @return the shared instance
49 public static PHPManualUIPlugin getDefault() {
54 * Returns an image descriptor for the image file at the given
55 * plug-in relative path
57 * @param path the path
58 * @return the image descriptor
60 public static ImageDescriptor getImageDescriptor(String path) {
61 return imageDescriptorFromPlugin(PLUGIN_ID, path);
64 public static String getString(String key) {
66 return PHPManualUiMessages.getString(key);
67 } catch (MissingResourceException e) {
68 return '!' + key + '!';