Hi,
In my RCP I have IAdapterFactory implementation that provides adapters for my UI Elements.
Whan I register it by hand like this:
IAdapterManager mgr = Platform.getAdapterManager();
myfact = new MyAdapterFactory();
mgr.registerAdapters(myfact , MyElement1.class);
mgr.registerAdapters(myfact , MyElement2.class);
and then have a view that after selecting an element the Properties View use the proper adapter to show the properties.
But whan I register the factory using plugin.xml file the factory does not work for IPropertySource.
<extension
point=”org.eclipse.core.runtime.adapters”>
<factory
adaptableType=”MyElement1″
class=”MyAdapterFactory”>
<adapter type=”org.eclipse.ui.views.IPropertySource”/>
<adapter type=”org.eclipse.ui.model.IWorkbenchAdapter”/>
</factory>
</extension>
getAdapterList of MyAdapterFactory returns array
private static final Class[] ADAPTER_LIST = {
IWorkbenchAdapter.class,
IPropertySource.class };
In fact when I use plugin.xml the only way I can get the Properties View to show info about my Element is to override getAdapter and return the MyElementPropertySource.
Is this a problem of Eclipse of MyEclipse?
/rp