PowerAda Grep Dialog
The Grep Dialog allows you to search for strings or regular expressions in the files or units in the current project. The scope of the search, that is the files or units in which to search, is controllable, and may be restricted to files or units whose name matches or contains a user-specified string. The result of the search is a list of files which contain text that matches the search string/expression, and a list of these matches. Each of those files may be viewed in the Text Browser to see the individual matches, or a text file may be saved containing the references for later inspection.
Contents of the Grep Dialog
A grep dialog consists of four areas:
- the main frame, which describes the current project;
- the Search Options frame, which allows the user to specify the search string/expression, what to search (files or units), where to search (full, working or baseline project), and the file or unit names to search. The user may restrict the scope of the search by specifying that all file or unit names either match or contain a specified string;
- the list of matches, which lists the files containing matches, and the line of text that contains the match, along with the Browse Match, Save All and Send To PowerAda buttons; and
- the action buttons.
The Search button starts a new grep operation. A working dialog will appear (to be used to interrupt the operation), and the query status will be updated to indicate which file is currently being checked. The Search button will start a new search operation if the previous search has completed.
Browse Match Button
The Browse Match button will open a text browser with the file containing the match selected from the list Matches and display the line containing the match found in that file. Alternatively, double-clicking on an entry in the list will achieve the same result. The Browse Match button is only active when there are files in the Matches list.
Save All Button
The Save All button will pop up a dialog to specify a text file to save the results of the search to. The text is in PowerAda "analysis" format, which means it should have a suffix of
.ana so it can be viewed by the PowerAda Powerada Build Windows.
Send To PowerAda
The Send To PowerAda button will display the results of the search in a PowerAda Hypertext View. The results are presented in PowerAda "analysis" format and the results may be browsed using the Hypertext Browser.
The Dismiss button will abandon a completed or interrupted search, and close the grep dialog. All information about the search will be lost.
The working dialog is presented while the grep operation is in progress. To interrupt the search, click the Interrupt button. This will suspend the operation, retaining the current results. The results may be examined at this time, the search may be resumed, or the search may be abandoned.