Hi

> What's currently making me swear? well the project we're on uses a *ton* of
> open source libraries (Acegi, geotools, etc), so naturally I want to look at
> the source , but you can't just right-click edit source bundle and set the
> source jar, no, it's "non-modifiable". Apparently the way you're meant to
> add source is to re-build the 3rd party project as an eclipse plugin from
> scratch with "export source" enabled. which is great if all your
> dependencies are themselves plugins that have carefully had source bundles
> built, then it just works. but if they're just normal libraries then God
> alone (and the eclipse PDE authors) know how to do (Googling for this
> problem gets few hits, mainly forum posts with people asking the same
> question with no reply, and one out of date post where one of the PDE
> authors laughs that this is the only request in 2years... )
> this makes me a sad panda because when I try to find out what a
> FeatureSource is, versus a SimpleFeature or even a DataSource (org.geotools,
> not javax.sql), I get nothing and have to open the source in textpad, and
> then I swear... (and I don't like swearing)

We have a similar situation. We put our bundles - both binary and
source - in a folder which is included in our Eclipse build target.
Eclipse doesn't automatically connect the binary/source bundles.

Most of the bundles we're using are from the SpringSource Enterprise
Bundle Repository. The source bundles don't have the
"Eclipse-SourceBundle"; I guess they don't want the Eclipse-specific
"Eclipse-SourceBundle" header in a generic OSGi bundle. Perhaps if
that header were there, Eclipse would be able to link the
source/binary bundles automatically (I haven't tried it).

To attach source to a plugin you can do this:

1. open the "Plug-ins" view
2. find the plugin you want to attach source to
3. right-click it, choose Import As --> Source Project
4. go to the "Package Explorer" view
5. find the newly-imported plugin
6. under "Referenced Libraries" right-click the plugin JAR, and choose
Properties
7. go to "Java Source Attachment"
8. set the source location (which could be the corresponding source
bundle for the binary bundle you just imported)

Of course this gives you a 'copy' of the bundle in your workspace,
whereas ideally this configuration would be in the bundles themselves.

Regards

Rich

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to