[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform] Re: IAdapterFactory vs. adapters extension

The reason you need to specify the types on the plugin.xml is because it won't load your factory class until a request is made for the type that is listed in the plugin.xml and your plugin is active. A very important policy of any Eclipse extension point is to NOT load other plugins until something happens that requires them. Otherwise it would have to load all adapter factories up front, activating all of those plugins, even if they are never ever needed.

Then once loaded it uses the getAdapterTypes() for the loaded factory later to determine if the loaded factory handles the type. That way a factory can be registered dynamically, not through plugin.xml, and still contribute adapters.
--
Thanks,
Rich Kulp