[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Re: Embedding Equinox OSGi and EclipseStarter


I just went through this recently for EclipseME. The thing I ran into was that you MUST:

- Import org.eclipse.osgi with source folders into your workspace
- Disable the the underlying platform's org.eclipse.osgi plugin in your launch configuration and make sure that you are using the imported version

If you don't do these things, your bundle won't be seen by the framework and your hooks won't get installed. Feel free to take a look at http://eclipseme.svn.sourceforge.net/viewvc/eclipseme/trunk/eclipseme-src/plugins/eclipseme.core.hooks/ as a (relatively) simple example of a working hook.

Hope that helps,

Steven E. Harris wrote:
Thomas Watson <tjwatson@xxxxxxxxxx> writes:

Equinox has a general hooking mechanism which allows you to hook
into many different parts of the framework (see

In that document, in the section "The Hook Registry", we find this paragraph:

,----[  hookconfigurators.properties files ]
| Extension bundles may provide their own hookconfigurators.properties
| file to specify additional hook configurators. The hook registry will
| discover all hookconfigurator.properties files on its classpath and
| will merge all declared configurator classes into one list.

Note the phrase "on /its/ classpath". What is /it/ here?

I ask because I created an extension bundle with a
hookconfigurator.properties file as specified, located at the root
directory within the extension bundle jar. The extension bundle gets
loaded just fine, but it doesn't look like the bundle gets searched by
HookRegistry.mergeFileHookConfigurators()¹. My bundle's
hookconfigurators.properties files is never found, and hence my hook
doesn't get registered.

Should I be able to provide a hookconfigurators.properties file in my
extension bundle? If so, what do I have to do make it discoverable?

Footnotes: ¹ On line 108, where ClassLoader.getResources() is called.