Introduction

prevnext

Locator Window - Find or Browse Entities


The Locator Window is used to find entities that have been declared or used in the analyzed source code.

The Locator Window is launched from the Search menu. If using the Search->Browse Entities menu item the Locator Window is shown as above. If accessing it via the Search->Locate Entities then a filter dialog is first presented.


Right-Click Menus

Right Click Menus are available in many views in Understand for Ada, including the Locator Window. By right-clicking on an item in the Locator Window, a menu of additional information available for the item will appear. Different menus will be presented based on the type of item being queried. Following is an example of a right-click menu for a package entity.

Right-click menus are also available for items in other views, including the Hierarchy, Declaration, Cross-Reference, and Source Code browser views.

Column Headers

Column headers are tools in the Locator Window. Left Click on them to sort, right click on them to filter or change their configuration.

Sorting Columns

Any column in the entity list may be sorted if desired. Right-click on any column header for sorting options. Left-click on the column header to toggle between sorting in ascending order and descending order. The column header of the sorted column will appear in bold type. The default sorting order is in ascending order of entity names.

Resizing of Columns

Column widths can be sized to adjust how much of each column is visible. Place the cursor on a column header divider between two columns. Double-click on the column header divider while the double-headed arrow is displayed and the field will be expanded to the maximum size needed for viewing all items in the list.

Column width can also be adjusted by clicking and dragging the double-headed arrow to the desired column width.

Long versus Short Names

In the Entity, Declared In and File columns, you can also specify viewing of short or long names. Long names include the name of the compilation unit for entity and function names or the full file path for filenames. Following is an example of showing long entity names.

Filtering

The right-click menus on cells in each column also have an option to set a filter limiting the entities shown by the Locator Window. The filter can be entered manually or automatically based on what was right clicked on. For example, you may filter by the Kind "Parameter" by right-clicking on any parameter listed in the Kind column and selecting Filter By Selection from the menu. This filters the list of entities to contain only those entities which are parameters. Any filter options selected in the main filter area of the Locator Window will remain in effect.

Only one Filter may be in effect at a time. Further Filters will replace any previous Filter. Filter can be performed on any item in the Kind, Declared In, or File Columns. Choosing Remove Filter can be selected from any column and removes the selected filtering previously placed on any other column.

Filter By Selection

Filters may be set automatically by right clicking on any cell and choosing "Filter by Selection".

Manual Filtering

Filtering from the right click menu is easy and quick. However it doesn't permit as much control as manually specifying a filter. To manually specify a filter, right click on the column header of the column you wish to filter on and choose "Filter By". This brings up the Filter By dialog:

Manual Filter Design

The "Filter By" text field can be used to specify simple text patterns to match, or more complicated ones using Regular Expressions.

When Match Case is in use, the filters permitted are a simple subset of regular expressions permitting only * or ?, where * matches any string of any length and ? matches a single character.

· * matches any string
· B* matches any string beginning with Upper Case B
· ??ext_io matches any entity name having 8 letters and ending in ext_io

Regular Expressions

When Regular Expression is checked, regular expressions are used. Regular expressions are a powerful and precise way to filter and manipulate text. Full explanation of regular expressions is beyond the scope of this manual.

Unix users may refer to the manual page for regex using the command "man -k regex". For a comprehensive explanation of regex expressions we refer you to the book "Mastering Regular Expressions", published by O'Reilly and Associates (www.ora.com/catalog/regex or 1-800-889-8969).

Removing Filters

A filter may be removed by Right Clicking on any Column Header and choosing "Remove Filter". This removes the current filter and causes the Locator Window to show all entities in the database.

prevnext


Scientific Toolworks, Inc.
http://www.scitools.com
Voice: (802) 763-2995
Fax: (802) 763-3066
support@scitools.com
sales@scitools.com