View Javadoc

1   package org.dbe.studio.tools.ssl2sdl.plugin;
2   
3   import org.eclipse.ui.plugin.*;
4   import org.eclipse.jface.resource.ImageDescriptor;
5   import org.osgi.framework.BundleContext;
6   
7   /***
8    * The main plugin class to be used in the desktop.
9    */
10  public class Ssl2SdlPlugin extends AbstractUIPlugin {
11  
12  	//The shared instance.
13  	private static Ssl2SdlPlugin plugin;
14  	
15  	/***
16  	 * The constructor.
17  	 */
18  	public Ssl2SdlPlugin() {
19  		plugin = this;
20  	}
21  
22  	/***
23  	 * This method is called upon plug-in activation
24  	 */
25  	public void start(BundleContext context) throws Exception {
26  		super.start(context);
27  	}
28  
29  	/***
30  	 * This method is called when the plug-in is stopped
31  	 */
32  	public void stop(BundleContext context) throws Exception {
33  		super.stop(context);
34  		plugin = null;
35  	}
36  
37  	/***
38  	 * Returns the shared instance.
39  	 */
40  	public static Ssl2SdlPlugin getDefault() {
41  		return plugin;
42  	}
43  
44  	/***
45  	 * Returns an image descriptor for the image file at the given
46  	 * plug-in relative path.
47  	 *
48  	 * @param path the path
49  	 * @return the image descriptor
50  	 */
51  	public static ImageDescriptor getImageDescriptor(String path) {
52  		return AbstractUIPlugin.imageDescriptorFromPlugin("org.dbe.studio.tools.ssl2sdl.plugin.Ssl2SdlPlugin", path);
53  	}
54  }