[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Getting an instance of a source bundle

The source jars are all available in a file called source.info located in eclipse\configuration\org.eclipse.equinox.source

p2 writes these files using SimpleConfigurationManipulatorImpl but I assume that PDE has some logic / helper code that does all the logic you are interested in since it needs to look at the p2 metadata to figure out the bundle to source relationship.






From: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Andrew Eisenberg
Sent: April-23-13 2:36 PM
To: Equinox development mailing list
Subject: [equinox-dev] Getting an instance of a source bundle


I would like to get a handle on a source bundle, but they do not seem to be installed in the running Eclipse.  For example, I would like to be able to do this:

Bundle jdtUiSource = Platform.getBundle("org.eclipse.jdt.ui.source");

However, this always returns null.

Indeed, when I look use the OSGi console, I see something like this, even though the source bundle is available:

osgi> ss org.eclipse.jdt.ui
"Framework is launched."
id    State       Bundle
243    ACTIVE      org.eclipse.jdt.ui_3.8.2.v20130107-165834

What I really need is a way to find the filesystem path to a source bundle (or null if not available).  So, I don't need the bundle instance, but this just seems like a handy way to get the path.

Does anyone have some ideas on what I can do?