Searching For Code With the Find and Replace
With CodeSMART it is possible to perform searches and obtain search result lists for a piece of code at various project levels or even on the entire project group. A new search operation is usually made by using the Find and Replace dialog window in order to provide specific search options, but it can also be done in an unattended manner based on the current code selection or by reviewing previous search operations saved in a history combo box control.
To perform a new search by using the CodeSMART Find and Replace dialog:
-
Optional. In the currently opened code pane select the text you want to search for.
-
Open the Find and Replace dialog using one of the methods described in Accessing the Find and Replace
-
Select the operation scope. Depending on the current position in code and the active code or designer window, only valid options are listed.
-
Type the text to search for, select a previously searched text from the Search for combo-box, or click on the Fill with current word link in order to search for the current selection in code.
-
To search for code that spans over multiple lines check the Multiline check box.
-
You may filter out results found within strings and/or comments by checking the appropriate check boxes.
-
You may also specify other search criteria in the Options section. You can search for whole words only or for words that exactly match the search text case.
-
Click Find to launch the search operation. All code lines that match your search criteria will be listed in the Find and Replace 1 or Find and Replace 2 pane, according to your selection.
-
Double-click an item in the active Find and Replace tab to jump to its exact code location or choose the Select In Code entry in the Enhanced Immediate Window shortcut menu. The code pane containing the item will be opened and the match will be selected.
To review a previous search from the History combo box:
-
Activate a Find and Replace pane, as the History combo box contains distinct information depending on each pane. The maximum number of items in each combo box is restricted to 10.
-
Choosing an item from the list will start a new search operation with the saved settings.
To perform a new unattended search based on the currently selected code:
-
In the currently opened code pane select the text you want to search for (multiple line selection is allowed).
-
Click the Find Selection Locally button on the Navigation and IDE Tools toolbar or choose the entry with the same name in the CodeSMART main menu, in order to start the search operation.
-
The search operation is made with a generic set of options (all results will be reported, ignoring any restriction) and the results are listed in the active Find and Replace pane.
Notes
-
Use the Find History combo box in order to re-run previous search and/or replace operations.
-
The result lists can be refreshed, cleared, printed, exported and the pane view can be customized all by using the pane's shortcut menu commands.
See also
Back To Top
|