Mercurial > hg > de.mpg.mpiwg.itgroup.digilib.plugin
annotate src/de/mpg/mpiwg/itgroup/digilib/plugin/Activator.java @ 27:361d8c89338a
Moved common classes to de.mpg.mpiwg.itgroup.digilib.core
author | dwinter |
---|---|
date | Sat, 18 Jun 2011 09:53:01 +0200 |
parents | 1a7940ac5169 |
children |
rev | line source |
---|---|
1 | 1 package de.mpg.mpiwg.itgroup.digilib.plugin; |
2 | |
3 import org.eclipse.jface.resource.ImageDescriptor; | |
4 import org.eclipse.ui.plugin.AbstractUIPlugin; | |
5 import org.osgi.framework.BundleContext; | |
6 | |
27
361d8c89338a
Moved common classes to de.mpg.mpiwg.itgroup.digilib.core
dwinter
parents:
24
diff
changeset
|
7 |
361d8c89338a
Moved common classes to de.mpg.mpiwg.itgroup.digilib.core
dwinter
parents:
24
diff
changeset
|
8 |
1 | 9 /** |
10 * The activator class controls the plug-in life cycle | |
11 */ | |
12 public class Activator extends AbstractUIPlugin { | |
13 | |
14 // The plug-in ID | |
15 public static final String PLUGIN_ID = "de.mpg.mpiwg.itgroup.diglib.plugin"; //$NON-NLS-1$ | |
22 | 16 |
17 //default base url fuer preferences | |
23 | 18 |
1 | 19 // The shared instance |
20 private static Activator plugin; | |
21 | |
22 /** | |
23 * The constructor | |
24 */ | |
25 public Activator() { | |
26 } | |
27 | |
28 /* | |
29 * (non-Javadoc) | |
30 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) | |
31 */ | |
32 public void start(BundleContext context) throws Exception { | |
33 super.start(context); | |
34 plugin = this; | |
35 } | |
36 | |
37 /* | |
38 * (non-Javadoc) | |
39 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) | |
40 */ | |
41 public void stop(BundleContext context) throws Exception { | |
42 plugin = null; | |
43 super.stop(context); | |
44 } | |
45 | |
46 /** | |
47 * Returns the shared instance | |
48 * | |
49 * @return the shared instance | |
50 */ | |
51 public static Activator getDefault() { | |
52 return plugin; | |
53 } | |
54 | |
55 /** | |
56 * Returns an image descriptor for the image file at the given | |
57 * plug-in relative path | |
58 * | |
59 * @param path the path | |
60 * @return the image descriptor | |
61 */ | |
62 public static ImageDescriptor getImageDescriptor(String path) { | |
63 return imageDescriptorFromPlugin(PLUGIN_ID, path); | |
64 } | |
22 | 65 |
23 | 66 |
1 | 67 } |