PowerAda Main Window

From OC Systems Wiki!
Jump to: navigation, search

The powerada main window consists of the Menus, a Buttonbar, the Location Text Field, the Current View, the Find Pane, and the Message Pane. This reference describes all of these areas in detail, but first here is a brief overview of each areas' purpose.

Current View

By far the most important part of a PowerAda window is the view (also known as a browser). This displays the information relevant to the task at hand (the list of files, a source file, the units in a library, etc.) and allows the user to initiate actions on that information. The "current view" is the one that appears in the main area of the powerada main window. Each type of view has its own set of commands, which are described in a Popup Menu.

From a user interface perspective, the views can be broken down into three types:

List-based views
These display a list of items, with the information broken into multiple columns. You can change whether or not a column is displayed, how wide each column is and which column is used to sort the list entries. Examples are a list of files (for instance a directory listing) or a list of compiled units (in a sublibrary, a library or an executable).
Text-based views
These display text in a variety of forms. Examples are a source file, or a compiled unit.
Graph-based views
This displays the relationships between objects in a graphical display. An example is the Class Browser.


All powerada operations can be performed from the menus. However, the most common operations are accessible through other methods as well such as the Buttonbar or by using Keyboard Accelerators.


While all powerada actions are available in pulldown menus, the most common powerada actions are also available on the Popup Menu and the buttonbar near the top of the Main window. The operations available are Back, Forward, Visit, Visit in New, Visit Enclosing, Edit, Refresh, and Search.

Perhaps the most important operation on the buttonbar is Edit, which opens the selected file or files in a text editor. The text editor is specified in the Preferences Dialog.

Another useful operation on the button bar is Refresh. This causes the contents of the current view to be recreated, which is useful when they may have changed. Refresh is particularly useful if Always Refresh Views is not selected in the Preferences dialog.

Location Text Field

The location text field displays the location currently being viewed.

This displays the current location, relative to the project's root directory. As a shortcut, you can type in locations directly into this text field.

The project's root directory is shown as an equals sign ('='). For example, if the project root is /home/joe/adaproj, the file /home/joe/adaproj/test/a.ada would be displayed as =/test/a.ada. Rather than navigating from the project root, to directory test, to a.ada, the location =/test/a.ada can be typed into the location box to navigate directly to the file.

The type of view used for a given location is determined from the syntax of the view string and the characteristics of what it describes. For example:

  • A Directory view is used for a path that names a directory;
  • A Text view is use for a path that names a file (even an Ada source file);
  • A Sublibrary view is used for a path that names a sublibrary, which is described by the directory path followed by "/adalib", e.g., =/test/adalib
  • A Library view for a specified sublibrary is indicated by appending "(library)" to the sublibrary location, e.g., =/test/adalib(library);
  • A Source view is used for a location describing a unit within a specific sublibrary, e.g.: =test/adalib/a(body).

Other views, such as a unit graph or the results of a search, cannot be created or reached based on a typed-in location.

Message Pane

The message pane is a sort of "console" for powerada. Informational messages appear here as actions occur. If you don't want to see the message pane, use the Show Messages item in the Project Menu.

Find Pane

The find pane allows string searches to be performed in the current view, if the view is of type file, unit, source, or text. The search is case-insensitive and wraps by default. A popup dialog containing toggle buttons can be used to reset the wrap and case-sensitive parameters, except in the hypertext view where all searches are always case-insensitive and wrap.

Text Field History

Immediately to the right of the Location and Find text fields is a button with an arrow on it. This indicates that a history of previously-entered values is maintained. Click on this button to display a list of choices and click on an item in the list to copy it to the text field. Hitting return in the text field will then perform the action. Alternatively, the up and down arrows keys may be used directly in the text field to cycle through the history.