Skip to main content

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

Thomas Watson <tjwatson@xxxxxxxxxx> writes:

> Equinox has a general hooking mechanism which allows you to hook
> into many different parts of the framework (see
> http://wiki.eclipse.org/index.php/Adaptor_Hooks).

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.

-- 
Steven E. Harris



Back to the top