PowerAda Source Browser View
A source browser shows the source for a compiled Ada unit. Source browsers are usually opened by selecting a unit from a Sublibrary, Library, or Executable view (
See Unit Views), or with Visit Compiled Unit from the File Views and Text View.
While in a source browser, specific compilation elements may be selected for queries. To select an element, use the middle mouse button (MB2).
The Source menu appears in the source browser view, and contains the following items.
Contents
Definition Of
Highlights, in a new view, the definition of the element under the cursor. This can also be done with the Visit or Visit In New buttons ( See Go Menu).
Derivation Of
Shows the derivation of the selected type in a new view ( See Class Browser View, below).
Representation Of
Shows implementation-level information such as memory layout for the selected element. For example:
- for subprograms, gives the parameters, including compiler-generated implicit parameters;
- for a record type, gives a representation clause for objects of that type;
- for scalar types, gives the size in bytes.
Local Uses
Finds all the uses of the current element in the current unit, displaying them in an outline pane at the top of the view.
Global Uses
Finds all the uses of the current element in any number of sublibraries, via the Global Uses Dialog (described in the online help).
Find Text
Used to find text or a number of Ada constructs within a source browser. Toggle buttons control whether text searches wrap at the end of the file, and whether or not they are case-sensitive.
In the find dialog, an option box controls the type of search, which can be either Text or a number of Ada constructs, like Exception Raises and Handlers, Subprogram Calls, Literals, and so on.
The Find All button finds all of the specified items in the current view. They are displayed in an outline pane at the top of the view, and highlighted in the main source browsing pane.
Find Next
Repeats the last Find Text operation.
Goto Line
Prompts for a line number to jump to.
Unit Info
Displays useful information about the current unit, including unit name, filename, sublibrary, compile timestamp, and compilation options used.
View Outline
Generates a list of all the subprograms in the current unit and displays them in an Outline Pane.
Show Line Numbers
Controls whether or not line numbers are displayed in source browser views.
Outline Pane
The Local Uses, Find Text, and View Outline operations described above may add an outline pane to a Source Browser view. The outline pane is a small list above the source in the browser window. It displays lines from the source. Clicking on a line in the outline pane moves the cursor to the corresponding line in the source pane.