What I meant is that you could copy the code in PDE :)

From: [email protected] [mailto:[email protected]] On Behalf 
Of Andrew Eisenberg
Sent: April-23-13 5:03 PM
To: Pascal Rapicault
Cc: Equinox development mailing list
Subject: Re: [equinox-dev] Getting an instance of a source bundle

Thanks, but unfortunately not so useful.  I can't guarantee that users will 
have PDE installed.  Since I know the full path to the bundle and I know the 
symbolic name of the source bundle, I can generate the path to the source 
bundle from the bundle.  (I'd miss the case where the source bundle and the 
bundle are installed in different locations, but that seems rare enough that I 
won't worry about it).

On Tue, Apr 23, 2013 at 11:40 AM, Pascal Rapicault 
<[email protected]<mailto:[email protected]>> wrote:
The source jars are all available in a file called 
source.info<http://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.

HTH

Pascal

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]<mailto:[email protected]>]
 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?

thanks,
Andrew

_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to