[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: publishing extension points - help!

Judah, the way you do this is by calling APIs in the
org.eclipse.core.runtime package. In particular, the following are useful

Platform.getPluginRegistry()
IPluginRegistry.getXXX ... various calls to get descriptors for plugins,
extension points, extensions, etc
methods on IPluginDescriptor, IExtension, IExtensionPoint,
IConfigurationElement

So to find out which items were configured into your extension point
"com.xyz.myplugin.foopoint" by some other plugin extensions you could do

IConfigurationElement[] cfg;
cfg =
Platform.getPluginRegistry().getConfigurationElementsFor("com.xyz.myplugin.foopoint");

To actually interact with one of the extensions (eg. with the first one in
the list returned above) you could then call

IFoo someFoo = (IFoo) cfg[0].createExecutableExtension("fooclass");

and once you have your object you are off to the races (see the javadoc for
explanation of the arguments). The idea is that others have plugged in
extensions that define classes implementing your IFoo interface (required by
the extension point) so you actually know how to interact with the resulting
object.

Also, see Help> Help Contents and select Platform Plug-In Developer Guide
from the drop box.

Hope this helps you get going.