Source attachments

To browse the source of a type contained in library you can attach a source archive or source folder to this library. The editor will then show the source instead of a the decompiled code. Having the source attachment set the debugger can offer source level stepping in this type.

The Source Attachment dialog can be reached in several ways:

Depending of how a JAR was contributed to the classpath, you can see different types of Source attachment dialogs:

JAR

In the Location path field, enter the path of an archive or a folder containing the source. Use either the Workspace, External File or the External Folder button to browse for a location.

 

Variable

In the Location Variable Path field enter a variable path that points to the source attachment's location. A variable path has as first segment a variable (which will resolve to a folder or file), the rest is an optional path extension (e.g.MYVARIABLE/src.jar ). Use either the Variable button to select an existing variable and the Extension button to select the extension path. The Extension button is only enabled when the variable can be extended (resolves to a folder)

JRE_SRC is a reserved variable that points to a JRE selected in the Installed JREs preference page (Window > Preferences > Java > Installed JREs). Go to this preference page to configure the source attachment for the JRE's library..

Related concepts
Build classpath

Related tasks
Working with build paths
Attaching source to variables
Attaching source to a JAR file
Installed JREs preferences
Java Build Path properties

Legal notices