Created from [https://bugs.eclipse.org/bugs/show_bug.cgi?id=184026 bug 184026].

+

Originally created from [https://bugs.eclipse.org/bugs/show_bug.cgi?id=184026 bug 184026] and then updated to describe the changes for JAR'd source bundles as per [https://bugs.eclipse.org/bugs/show_bug.cgi?id=206596 bug 206596].

+

+

===What you need to do===

+

If you have bundles in Orbit and you would like to have source bundles automatically generated for you, here are the things that you have to do:

+

* put your bundles in the structure below

+

* add a map file entry for your source bundle

===Bundle structure===

===Bundle structure===

+

In order to leverage the automatic infrastructure, avoid the profusion of projects in CVS and simplify management, it is recommended that you store the source bundles in the same project than its binary counter part. This is achieved by creating a sub-folder called "source-bundle" in the project. This folder will be setup like any other bundle with a manifest.mf, build.properties, etc...

In the old Eclipse method, source bundles were contributed to Eclipse by using an extension point. In the new method, you will need to add a new bundle header to your bundle manifest to tell Eclipse that your bundle is a source bundle and to specify the id and version of the host bundle.

+

<pre>

+

Eclipse-SourceBundle: my.bundle.id;version="1.0.0.qualifier"

+

</pre>

+

This is the format for the most common case; where the bundle source is unzipped at the root of the source bundle.

+

+

====Multiple Roots====

+

If you have multiple folders in your source bundle which specify source, then you must tell Eclipse that there are multiple roots. This can be the case for instance if you ship an un-JAR'd bundle with multiple source zip files that you don't want to merge into a single directory structure.

Bundle structure

In order to leverage the automatic infrastructure, avoid the profusion of projects in CVS and simplify management, it is recommended that you store the source bundles in the same project than its binary counter part. This is achieved by creating a sub-folder called "source-bundle" in the project. This folder will be setup like any other bundle with a manifest.mf, build.properties, etc...

MANIFEST.MF

In the old Eclipse method, source bundles were contributed to Eclipse by using an extension point. In the new method, you will need to add a new bundle header to your bundle manifest to tell Eclipse that your bundle is a source bundle and to specify the id and version of the host bundle.

Eclipse-SourceBundle: my.bundle.id;version="1.0.0.qualifier"

This is the format for the most common case; where the bundle source is unzipped at the root of the source bundle.

Multiple Roots

If you have multiple folders in your source bundle which specify source, then you must tell Eclipse that there are multiple roots. This can be the case for instance if you ship an un-JAR'd bundle with multiple source zip files that you don't want to merge into a single directory structure.