1 package eu
.etaxonomy
.taxeditor
.store
.internal
;
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
;
10 * The activator class controls the plug-in life cycle
12 public class TaxeditorStorePlugin
extends AbstractUIPlugin
{
14 public static final Logger logger
= Logger
.getLogger(TaxeditorStorePlugin
.class);
17 public static final String PLUGIN_ID
= "eu.etaxonomy.taxeditor.editor";
19 // The shared instance
20 private static TaxeditorStorePlugin plugin
;
25 public TaxeditorStorePlugin() {
30 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
32 public void start(BundleContext context
) throws Exception
{
35 logger
.trace("Plugin started: " + this.getBundle().getSymbolicName());
40 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
42 public void stop(BundleContext context
) throws Exception
{
45 logger
.trace("Plugin stopped");
49 * Returns the shared instance
51 * @return the shared instance
53 public static TaxeditorStorePlugin
getDefault() {
58 * Returns an image descriptor for the image file at the given
59 * plug-in relative path
61 * @param path the path
62 * @return the image descriptor
64 public static ImageDescriptor
getImageDescriptor(String path
) {
65 return imageDescriptorFromPlugin(PLUGIN_ID
, path
);
70 * Exposes this normally protected method.
72 public ImageRegistry
createImageRegistry(){
73 return super.createImageRegistry();
76 /************************ ERROR CODES ****************************/
79 * An attempt was made to save a taxon with a zero length name
81 public static final int ERROR_SAVING_ZERO_NAME
= 52000;