[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform] Re: how to read the extensions registry outside eclipse

Rashmy wrote:
I found examples in the below two plugins for the creation of my own ExtensionsRegsitry outside of the Eclipse IDE
org.eclipse.equinox.test.internal.standalone
org.eclipse.core.tests.internal.registry.simple


But both these require me to pass an IContributor that is defined in core.runtime.

No, it's in the org.eclipse.core.runtime package but it is actually defined in the equinox.registry bundle. ContributorFactorySimple is also in the equinox.registry bundle.


Also, check in the thread titled "Using Extension Registry without OSGi" in eclipse.technology.equinox. It looks like you don't even need the org.eclipse.osgi bundle, but can reduce the size needed by using the supplemental one.

It can be done completely with the 3 jars mentioned in this thread and a java app:

masterToken = new Object();
registry = RegistryFactory.createRegistry(new RegistryStrategy(null, null), masterToken, null);


Then for each plugin.xml you need to check:

InputStream pluginXmlInput = ...;
String pluginXmlId = ...;
ResourceBundle pluginXmlResources = null; // or dig out the correct one
registry.addContribution(pluginXmlInput, ContributorFactorySimple.createContributor(pluginXmlId), false, pluginXmlId, pluginXmlResources, masterToken);


Later,
PW


-- Paul Webster http://wiki.eclipse.org/Platform_Command_Framework http://wiki.eclipse.org/Command_Core_Expressions http://wiki.eclipse.org/Menu_Contributions http://wiki.eclipse.org/Menus_Extension_Mapping