1
|
package eu.etaxonomy.taxeditor.store.internal;
|
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
|
* @version $Id: $
|
13
|
*/
|
14
|
public class TaxeditorStorePlugin extends AbstractUIPlugin {
|
15
|
|
16
|
// The plug-in ID
|
17
|
/** Constant <code>PLUGIN_ID="eu.etaxonomy.taxeditor.editor"</code> */
|
18
|
public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.editor";
|
19
|
|
20
|
// The shared instance
|
21
|
private static TaxeditorStorePlugin plugin;
|
22
|
|
23
|
/**
|
24
|
* The constructor
|
25
|
*/
|
26
|
public TaxeditorStorePlugin() {
|
27
|
}
|
28
|
|
29
|
/*
|
30
|
* (non-Javadoc)
|
31
|
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
|
32
|
*/
|
33
|
/** {@inheritDoc} */
|
34
|
@Override
|
35
|
public void start(BundleContext context) throws Exception {
|
36
|
super.start(context);
|
37
|
|
38
|
plugin = this;
|
39
|
|
40
|
//PreferencesUtil.setDefaults();
|
41
|
}
|
42
|
|
43
|
/*
|
44
|
* (non-Javadoc)
|
45
|
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
46
|
*/
|
47
|
/** {@inheritDoc} */
|
48
|
@Override
|
49
|
public void stop(BundleContext context) throws Exception {
|
50
|
plugin = null;
|
51
|
super.stop(context);
|
52
|
}
|
53
|
|
54
|
/**
|
55
|
* Returns the shared instance
|
56
|
*
|
57
|
* @return the shared instance
|
58
|
*/
|
59
|
public static TaxeditorStorePlugin getDefault() {
|
60
|
return plugin;
|
61
|
}
|
62
|
|
63
|
/**
|
64
|
* Returns an image descriptor for the image file at the given
|
65
|
* plug-in relative path
|
66
|
*
|
67
|
* @param path the path
|
68
|
* @return the image descriptor
|
69
|
*/
|
70
|
public static ImageDescriptor getImageDescriptor(String path) {
|
71
|
return imageDescriptorFromPlugin(PLUGIN_ID, path);
|
72
|
}
|
73
|
|
74
|
|
75
|
/**
|
76
|
* Exposes this normally protected method.
|
77
|
*
|
78
|
* @return a {@link org.eclipse.jface.resource.ImageRegistry} object.
|
79
|
*/
|
80
|
@Override
|
81
|
public ImageRegistry createImageRegistry(){
|
82
|
return super.createImageRegistry();
|
83
|
}
|
84
|
}
|