Refactory: remove unused classes, imports, fields and methods.
[phpeclipse.git] / net.sourceforge.phpeclipse.phpmanual / src / net / sourceforge / phpeclipse / phpmanual / PHPManualUIPlugin.java
1 package net.sourceforge.phpeclipse.phpmanual;
2
3 import java.util.MissingResourceException;
4
5 import org.eclipse.jface.resource.ImageDescriptor;
6 import org.eclipse.ui.plugin.AbstractUIPlugin;
7 import org.osgi.framework.BundleContext;
8
9 /**
10  * The activator class controls the plug-in life cycle
11  */
12 public class PHPManualUIPlugin extends AbstractUIPlugin {
13
14         // The plug-in ID
15         public static final String PLUGIN_ID = "net.sourceforge.phpeclipse.phpmanual";
16
17         // The shared instance
18         private static PHPManualUIPlugin plugin;
19         
20         /**
21          * The constructor
22          */
23         public PHPManualUIPlugin() {
24                 plugin = this;
25         }
26
27         /*
28          * (non-Javadoc)
29          * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
30          */
31         public void start(BundleContext context) throws Exception {
32                 super.start(context);
33         }
34
35         /*
36          * (non-Javadoc)
37          * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
38          */
39         public void stop(BundleContext context) throws Exception {
40                 plugin = null;
41                 super.stop(context);
42         }
43
44         /**
45          * Returns the shared instance
46          *
47          * @return the shared instance
48          */
49         public static PHPManualUIPlugin getDefault() {
50                 return plugin;
51         }
52
53         /**
54          * Returns an image descriptor for the image file at the given
55          * plug-in relative path
56          *
57          * @param path the path
58          * @return the image descriptor
59          */
60         public static ImageDescriptor getImageDescriptor(String path) {
61                 return imageDescriptorFromPlugin(PLUGIN_ID, path);
62         }
63         
64         public static String getString(String key) {
65                 try {
66                         return PHPManualUiMessages.getString(key);
67                 } catch (MissingResourceException e) {
68                         return '!' + key + '!';
69                 }
70         }
71 }