Platform.getBundle("pluginId") should help you but why would you want to do this
?
You shouldn't tie functionality to if a certain osgi plugin is loaded, but to weather
a certain extension point or service is available.
i.e. Maven integration in jboss tools is separated out in to a separate plugin to ensure
it only gets loaded when m2ecipse plugins
are around and avoids having a maven dependency to the other plugins (i.e. seam core can
be used with maven but doesnt depend)
Another way (but should be kept to a minimum) is to use optional dependencies and do a
load for the class you want inside a try/catch for
NoClassDefFoundError. Then your plugin still loads even if the optional plugin is not
available and only fails if you try access these extra
classes which you can guard against with the try/catch.
The trick here is to ensure you don't references those optional dependencies except
for a very few controlled places.
/max
On May 11, 2010, at 18:08, Brian Fitzpatrick wrote:
Hi guys...
We have a bug for the Eclipse Guvnor Tools (EGT) where we need to be able to tell whether
we're running a particular plug-in in JBDS or JBoss Tools... Is there an easy check to
determine this?
--Fitz
_______________________________
Brian Fitzpatrick (aka "Fitz")
Senior Software Engineer, SOA-P
JBoss by Red Hat
_______________________________________________
jbosstools-dev mailing list
jbosstools-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jbosstools-dev