01: package org.eclipse.ui.examples.jobs;
02:
03: import org.eclipse.core.runtime.*;
04: import org.eclipse.ui.examples.jobs.views.ProgressExampleAdapterFactory;
05: import org.eclipse.ui.examples.jobs.views.SlowElement;
06: import org.eclipse.ui.plugin.AbstractUIPlugin;
07: import org.osgi.framework.BundleContext;
08:
09: /**
10: * The main plugin class to be used in the desktop.
11: */
12: public class ProgressExamplesPlugin extends AbstractUIPlugin {
13: //The shared instance.
14: private static ProgressExamplesPlugin plugin;
15:
16: /**
17: * The constructor.
18: */
19: public ProgressExamplesPlugin() {
20: super ();
21: plugin = this ;
22: }
23:
24: /**
25: * Returns the shared instance.
26: */
27: public static ProgressExamplesPlugin getDefault() {
28: return plugin;
29: }
30:
31: /* (non-Javadoc)
32: * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
33: */
34: public void start(BundleContext context) throws Exception {
35: super .start(context);
36: IAdapterManager m = Platform.getAdapterManager();
37: IAdapterFactory f = new ProgressExampleAdapterFactory();
38: m.registerAdapters(f, SlowElement.class);
39: }
40: }
|