|
|
|
Re: dynamically adding extensions [message #540480 is a reply to message #540466] |
Wed, 16 June 2010 10:49 |
Stefan Liebig Messages: 124 Registered: July 2009 |
Senior Member |
|
|
Hi,
I use this within unit tests to ´manually´ provide new
extensions/extension points:
final IExtensionRegistry registry = RegistryFactory.getRegistry();
final InputStream inputStream = forLoad.getResourceAsStream(pluginResource);
final IContributor contributor =
ContributorFactoryOSGi.createContributor(getContext().getBun dle());
final boolean success = registry.addContribution(inputStream,
contributor, false, pluginResource, null,
((ExtensionRegistry) registry).getTemporaryUserToken());
hth
Tschüß,
Stefan
On 16.06.2010 11:19, stephan.paulicke@web.de wrote:
> Hi,
> thanks for the answer. I've found some code snippets on that, but they
> didn't really help. I somehow add a contributor, but ended up with
> ClassNotFound exceptions.
> Do you have perhaps a sample snippet?
>
> Thanks in advance.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02900 seconds