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