[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.rcp] using IAdapterManager.getAdapter() at plugin startup
|
- From: Gabriel Bermudez <elgabo81@xxxxxxxxx>
- Date: Thu, 24 Jul 2008 18:10:06 -0500
- Newsgroups: eclipse.platform.rcp
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.16 (Windows/20080708)
Hi all,
It seems that is not possible to use the IAdapterManager.getAdapter() at
a plugin startup, that is calling it from the plugin's
Activator.startup() method. When do the IAdapterFactories get
registered? after the plugin's startup? What I tried to do is the following:
Activator.java
public class Activator ... {
private Model model;
...
public void start(BundleContext context) throws Exception {
super.start(context);
this.model=new Model();
plugin = this;
}
...
public Model getModel(){return this.model;}
}
the Model constructor internally does a
Platform.getAdapterManager().getAdapter() but this only returns null. I
thought all my plugin's IAdapterFactories would be registered after
calling super.start() Is this normal or I'm missing something? Is there
a workaround other than manually registering my factories to the adapter
manager?
Thanks for your help.