views:

1703

answers:

4

I've got a workspace with multiple RCP plugin projects.

We've set the target platform, so we can build against a standard set of plugins, but are not able to see source code and Javadoc for all the platform plugins.

The Windows -> Preferences -> Plug-in Development -> Target Platform -> Source Code Locations page doesn't seem to have any effect when I add the eclipse directory (it only allows you to add directories).

Copying the source jars from the eclipse directory into the target platform has a similar effect.

What am I doing wrong? How do I attach a set of Source jars to my target platform?

A: 

I can modify the target platform at runtime, using the -install runtime option. Keep the targetPlatform as the eclipse platform.

However, this loses a lot of the benefits of using a target platform in the first place - i.e. compile time safety.

jamesh
+1  A: 

If you use Eclipse SDK bundles when building your target platform, you should be immediately provided with "Java Source Attachment" and "Javadoc Location" for each Eclipse plugin. For example, I used "Eclipse Platform SDK" (eclipse-platform-SDK-3.4.2-win32) as target space and when I display the "Source Code Locations page" that you mentionned, it is filled with "Source locations declared in the target platform". In the Eclise IDE, I can then see Eclipse core plugins source code and javadoc (in JFace packages for example).

Otherway, it is not so easy to add plugins source code locations but you can succeed it in 2 ways :

  • providing a "source plugin" (the easiest way if the plugin provider also supplies the source plugin) into the target platform, as an ordinary plugin (PDE will recognise it)
  • providing an additional source location (not the easy way ...)

You can find more information about Target Source Code Locations in you Eclipse Help, in the following topic : Plug-in Development Environment Guide > Tools > Preferences > Target Platform Preferences > Source Code Locations

JM.D
A: 

I can't find Source Code Locations page on eclipse 3.5

Is there a way to attach source code to my target platform plugins?

lucas
Same problem here with Eclipse 3.5 (Ganymede) or Eclipse 3.6 (Helios)
paulgreg
Question asked here : http://stackoverflow.com/questions/3784977/why-is-the-source-code-locations-page-missing-on-eclipse-3-6-helios
paulgreg
A: 

The IDE fails to load the source when doing dynamic source code selection during class/method drill down. In Ecliopse 3.4.x it works correctly, 3.5.x does not.

malcolm