- This topic has 2 replies, 2 voices, and was last updated 19 years, 3 months ago by sonofseven.
-
AuthorPosts
-
sonofsevenMemberHi,
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
Scott AndersonParticipantrp,
Is this a problem of Eclipse of MyEclipse?
It’s likely a difference in what you expect to happen and how Eclipse implements it. To find out for sure, update your runtime PDE launch configuration to *only* launch with the Eclipse plugins, not any MyEclipse plugins. Does it operate as you expect in that configuration?
sonofsevenMemberok, this is me being an arse
the problem is with adapter type org.eclipse.ui.views.IPropertySource
it should be org.eclipse.ui.views.properties.IPropertySourceI got misslead by the example on the eclipse homepage which must be referring to the old version of eclipse.
sorry to waist your time
/rp -
AuthorPosts