The PDE Build provides a pretty convenient way of automatically creating a source feature. The additional feature contains all source files and artefacts listed in the containing bundles’ build.properties files for a source build. There are only a few settings necessary.
Assume we have a feature com.foo.feature containing some bundles with binaries only.
First, we need to configure a source feature include for the feature. Simply add a line to the com.foo.feature feature’s feature.xml:
<includes id="com.foo.feature.source" />
The linked feature com.foo.feature.source does not exist yet, it will be created by the PDE Build later on.
To get the PDE Build actually creating the source feature, we have to edit the com.foo.feature features’s build.properties by adding another line to it:
firstname.lastname@example.org = com.foo.feature
The PDE Build will now build the linked source feature com.foo.feature.source including a bundle containing all sources of all binary bundles included in the com.foo.feature feature. Since Eclipse 3.4, we can tell the PDE Build to create an individual source bundle for each bundle by setting a PDE Build property individualSourceBundles to true.