Introduction |
The Locator Window is used to find entities that have been declared or used in the analyzed source code. It is launched from the Search pulldown on the menu bar.
· Search->Locate Entities displays the Locator Window and also pops up a Filter dialog where you can specify a text string or regular expression in which you wish to filter the entity list.As in other windows in Understand for Ada, when right clicking on an entity anywhere in the Locator Window, a menu of additional information available for the item appears.
The Filter dialog of the Locator Window is used to limit the list of entities to just those of interest to you. The Filter dialog filters the Entity List based on textual filtering of entity names.
Anytime the Locator Window is displayed, you can bring up the Filter Dialog by either right clicking on the "Entity" column header of the Locator Window or by choosing Search->Locate Entities from the main menubar.
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, and Source Editor views.
Column headers are tools in the Locator Window. Left Click on them to sort, right click on them to filter or change their configuration.
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.
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.
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.
In the Kind, Declared In, and File columns, you can also choose to Hide one or more of those columns from view. Once a column is hidden, choose Show Column to redisplay it. You can also use the Hide/Show features to re-order those three columns if desired.
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.
Filters may be set automatically by right clicking on any cell and choosing "Filter by Selection". For example, you may filter by the Kind "Object" by right-clicking on any object 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 objects.
Only one Filter By Selection can be applied at a time. Further actions of Filter By Selection will replace any previous Filtering By Selection. Choosing Remove Filter can be selected from any column and removes the selected filtering previously placed on any other column.
Following is an example showing Filter By Selection for an entity Kind
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:
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 stringWhen 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).
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.
Scientific Toolworks, Inc. http://www.scitools.com Voice: (802) 763-2995 Fax: (802) 763-3066 support@scitools.com sales@scitools.com |