- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- TmfUiTracer.init();
- TmfTraceElement.init();
- TmfTimePreferences.init();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- TmfUiTracer.stop();
- plugin = null;
- super.stop(context);
- }
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ TmfUiTracer.init();
+ TmfTraceElement.init();
+ TmfTimePreferences.init();
+
+ fTmfEventAdapterFactory = new TmfEventAdapterFactory();
+ Platform.getAdapterManager().registerAdapters(fTmfEventAdapterFactory, ITmfEvent.class);
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ TmfUiTracer.stop();
+ plugin = null;
+
+ Platform.getAdapterManager().unregisterAdapters(fTmfEventAdapterFactory);
+ super.stop(context);
+ }