# Source Code Locations

In Eclipse, source code and extension point schemas are shipped in separate source locations. The Eclipse SDK source is shipped as a set of source plug-ins, included in the plugins directory. Source can also be shipped using declared source locations.

To see a list of known source code locations:

1. Open the Java > Target Platform preference page.
2. Go to the Source Code Location tab.

You can add additional locations to search for source by clicking Add... and browsing the file system. The subdirectories of the additional source code locations must follow the layout and naming conventions for declared source locations.

## Source Plug-ins

Source can be shipped as a plug-in with a special manifest header. These source plug-ins (also called individual source bundles) can be treated as normal plug-ins, though they will not be installed or started. The plug-ins can be contained in a folder or jar file. When placed in the plugins directory, they will be recognized as source by PDE.

For more information on the structure and generation of source plug-ins, see Individual Source Bundles

## Declared Source Locations

An alternative way to ship source code locations is to use declared (pre-defined) source locations. This is done by using the org.eclipse.pde.core.source extension. A plug-in defining this extension will be treated as a source location. The extension point schemas and source archive(s) for a plug-in are located in a unique subdirectory under one of these source code locations. The name and structure of the subdirectories must follow a specific convention.

For more information on generating declared source locations, see Source Generation.

### Declared Source Location Naming Convention

Each subdirectory must have the {id}_{version} naming convention, where id is the plug-in ID and version is the plug-in version.

For instance, org.eclipse.pde.source is the plug-in containing the source code for all org.eclipse.pde.* plug-ins.

Therefore, the source code and extension point schemas for the org.eclipse.pde.core plug-in are located at {eclipse_installation}/plugins/org.eclipse.pde.source_3.3.0.{qualifier}/src/org.eclipse.pde.core_3.3.0.{qualifier}/

The ZIP archive containing the source code for a plug-in must follow the {library_name}src.zip naming convention.

For example, if a plug-in has the Bundle-ClassPath: xyz.jar MANIFEST.MF header, then the source code must be packaged in a ZIP archive named xyzsrc.zip.

If the plug-in has no Bundle-ClassPath MANIFEST.MF header or the header is of the form Bundle-ClassPath: . , then the source code must be packaged in a ZIP archive named src.zip.

Target Platform
Target Plug-ins
Target Environment
Launching Arguments
Implicit Dependencies