Project

General

Profile

Download (1.55 KB) Statistics
| Branch: | Tag: | Revision:
1
package eu.etaxonomy.taxeditor.webapp;
2

    
3
import org.eclipse.jface.resource.ImageDescriptor;
4
import org.eclipse.jface.resource.ImageRegistry;
5
import org.eclipse.ui.plugin.AbstractUIPlugin;
6
import org.osgi.framework.BundleContext;
7

    
8
/**
9
 * The activator class controls the plug-in life cycle
10
 *
11
 * @author n.hoffmann
12
 */
13
public class TaxeditorWebappPlugin extends AbstractUIPlugin {
14

    
15
	// The plug-in ID
16
	/** Constant <code>PLUGIN_ID="eu.etaxonomy.taxeditor.editor"</code> */
17
	public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.editor";
18

    
19
	// The shared instance
20
	private static TaxeditorWebappPlugin plugin;
21

    
22
	/**
23
	 * The constructor
24
	 */
25
	public TaxeditorWebappPlugin() {
26
	}
27

    
28
	@Override
29
    public void start(BundleContext context) throws Exception {
30
		super.start(context);
31
		plugin = this;
32
	}
33

    
34
	@Override
35
    public void stop(BundleContext context) throws Exception {
36
		plugin = null;
37
		super.stop(context);
38
	}
39

    
40
	/**
41
	 * Returns the shared instance
42
	 *
43
	 * @return the shared instance
44
	 */
45
	public static TaxeditorWebappPlugin getDefault() {
46
		return plugin;
47
	}
48

    
49
	/**
50
	 * Returns an image descriptor for the image file at the given
51
	 * plug-in relative path
52
	 *
53
	 * @param path the path
54
	 * @return the image descriptor
55
	 */
56
	public static ImageDescriptor getImageDescriptor(String path) {
57
		return imageDescriptorFromPlugin(PLUGIN_ID, path);
58
	}
59

    
60

    
61
	/**
62
	 * Exposes this normally protected method.
63
	 *
64
	 * @return a {@link org.eclipse.jface.resource.ImageRegistry} object.
65
	 */
66
	@Override
67
    public ImageRegistry createImageRegistry(){
68
		return super.createImageRegistry();
69
	}
70
}
(4-4/4)