Name-based BrowsingAda-ASSURED can locate Ada definitions in a library. The feature uses a names database created by the utility program aa.tags.
Name browsing is illustrated using a sample database contained in file aahome/Ada-ASSURED/files/demo.tags.
(This database is created by aa-tags as part of the Ada-ASSURED release. To browse the names in your own programs, you must first run aa-tags to create your own database.)
Invoke command
load-names
(menu: Tools/Names Browsing/Load Names).
Enter the full pathname of the demo.tags file in the database
field, or use the browser to find it. Then strike OK.
Invoke command
find-name
(menu: Tools/Names Browsing/Find Name
key: Alt+.).
Note: the key binding is Alt followed by a period, not Alt followed by a plus sign, then a period.
A dialog box appears displays all entries in the database that match the criteria for the search. One of the criteria is the name to look for. This can be the wildcard character ?, which matches all names. We will first display all entries in the database.
Confirm that the Name field contains a single
question mark. Then click on the Match All button, and then
click on the Find button.
The dialog box displays all entries in the database. You can load any of these by selecting it and clicking on Open.
The fifth item in the list should read: Diners: procedure
def. Click on this item to select it, then click on Open.
The file will be loaded, and the selection will be positioned at the definition of Diners. The list of matches in the dialog box can be refreshed with respect to a name in file.
Click within the name Open_The_Room in the file
(two lines down from the selection). Click on the Refresh button
in the dialog box.
There are two matches for Open_The_Room, the entry specification and the entry definition.
View both the specification and the definition by
selecting each item in the list widget and clicking
Open.
Hypertext browsing from a use of a name to its definition and/or specification is provided by find-spec (menu: Tools/Names Browsing/Find Spec X: Alt+SELECT NT: mouse MENU/Find Spec) and find-definition (menu: Tools/Names Browsing/Find Definition X: ^SELECT NT: mouse MENU/Find Definition).
Find a use of the name Table_type in
Diners.
Invoke find-spec either by
selecting the name and then invoking find-spec from the
Tools menu, or by clicking on the name with Alt+SELECT.
The declaration is selected.
By default, the library names browser opens files in TEXT mode. The default mode can be changed by toggling Tools/Names Browsing/Browse as TEXT. The remainder of the tutorial assumes that buffer line.a has syntactic mode compilation.
Invoke coerce-buffer
(X menu: View/Buffers/Coerce Buffer
NT menu: Window/Coerce Buffer)
from within the window containing file line.a, select syntactic mode
compilation, and click on OK.