Browsing via Source Code Hyperlinks

Users can browse through the source code by treating any name in an Ada editor as a hyperlink. Clicking on the name while holding down the control key will place the cursor on the corresponding specification (for program units) or declaration (for other entities, such as objects and types). Traversing the defining name within a program unit declaration will display the corresponding body if the body exists.

Note: when the hyperlink traversal mechanism does not work correctly, you probably need to rebuild the project.

In the figure below, the user is pressing the control key and moving the mouse over the name of the package, so the editor has indicated that the name can be treated as a hyperlink by changing the color to blue and underlining it.

Source code hyperlink package spec

If the user then clicks on the package name, the editor opens the file containing the corresponding package body and places the cursor on that line, as shown in this figure:

Source code hyperlink package body

Hyperlinks work for the visible and private parts of packages so the full declaration of a private type can be visited from the partial view, and vice versa.

Source code hyperlink type declaration

Client code will frequently want to visit the declaration of a type (or object) and the hyperlink mechanism will handle that usage:

Source code hyperlink client type reference

When clicked, the editor then takes the user to the corresponding declaration:

Source code hyperlink visited type declaration