Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » How do I determine the contributing bundle for a given extension
How do I determine the contributing bundle for a given extension [message #62819] Wed, 01 March 2006 09:15 Go to next message
Tom Hofmann is currently offline Tom HofmannFriend
Messages: 770
Registered: July 2009
Senior Member
I do the following to determine whether the bundle that contributes an
extension to my extension point is loaded:

boolean isPluginLoaded(IConfigurationElement element) {
String symName= element.getContributor().getName();
Bundle bundle= Platform.getBundle(symName);
return bundle != null && bundle.getState() == Bundle.ACTIVE;
}

Is this correct, or should I be using element.getNamespaceIdentifier()?

The spec comments on IConfigurationElement and IContributor are not
entirely clear to me - I am not sure whether an IContributor usually
maps to a Bundle / Plug-in or if this is something entirely different.

Thanks in advance, tom
Re: How do I determine the contributing bundle for a given extension [message #62836 is a reply to message #62819] Wed, 01 March 2006 09:34 Go to previous message
Tom Hofmann is currently offline Tom HofmannFriend
Messages: 770
Registered: July 2009
Senior Member
Oops, this isn't really equinox or osgi related. Reposted on
eclipse.platform.

-tom

Tom Eicher wrote:
> I do the following to determine whether the bundle that contributes an
> extension to my extension point is loaded:
>
> boolean isPluginLoaded(IConfigurationElement element) {
> String symName= element.getContributor().getName();
> Bundle bundle= Platform.getBundle(symName);
> return bundle != null && bundle.getState() == Bundle.ACTIVE;
> }
>
> Is this correct, or should I be using element.getNamespaceIdentifier()?
>
> The spec comments on IConfigurationElement and IContributor are not
> entirely clear to me - I am not sure whether an IContributor usually
> maps to a Bundle / Plug-in or if this is something entirely different.
>
> Thanks in advance, tom
Previous Topic:How to embedded the OSGi framework into the standalone application?
Next Topic:multiple versions of one bundle
Goto Forum:
  


Current Time: Thu Apr 25 04:17:35 GMT 2024

Powered by FUDForum. Page generated in 0.02879 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top