The Search Files command searches through multiple files. A new Search Results output window is created. Each time Source Insight finds a matching line in a file, it appends an entry to the Search Results. Each line in the Search Results file can have source links that link the line with the location of the matching text in another file.
Search
Click this button to begin the searching in the selected files, or the file named in the File Name text box.
Select All
Click to select all the files in the file list.
Browse
Click this button to show the Open File dialog box, so that you can browse your disks to locate a file to be searched. When you select a file in the Open File dialog box, its full path will be placed in the File Name text box.
Find
Type the pattern to be found in this text box. The pattern can be a regular expression.
File Name
The name of the file to search. You may also add a series of wildcard specifications and click the Search button and Source Insight will replace the file list with the results of the wildcard expansion. If the Project Wide option is on, the wildcards are expanded over the whole list of files in the current project; otherwise, the wildcards are expanded in the current directory.
If the Project Wide option is on, Source Insight will search the project symbol for file names added in the File Name text box, so you don’t have to include a directory specification for those files.
File list
If the Project Wide option is on, then this list displays all files in the current project.
If the Project Wide option is off, then this list displays all the files in the current working directory. The current directory path is displayed above the file list. Source Insight shows only files for known document types in the current directory. The document types are specified with the Document Options command.
Show Dirs
Click this button to toggle the file list contents between showing file names, and showing only subdirectory names. When the subdirectories are shown, this button changes to “Show Files”.
Options Group
Project Wide
This check box controls whether the File list shows all the files in the project, or just the files in the current working directory.
Include Subdirectories
If this check box is checked, then any selected directories are recursively searched. This option and the Project Wide option are mutually exclusive.
To recursively search a set of directories:
1. Uncheck the Project Wide check box.
2. Check the Include Subdirectories check box.
3. Select one or more directories in the file list.
You can also type a file wildcard specification in the File Name text box to limit the search to particular file extensions or names.
Case Sensitive
If checked, Source Insight will only find matches if the case matches exactly.
Use Regular Expressions
If checked, the Find pattern is assumed a regular expression. See also “Regular Expressions”.
Find Non-Matching
If checked, Source Insight will find all lines where the pattern did not match.
Whole Words Only
If checked, then Source Insight only finds matches that are whole words. If not checked, then Source Insight will also find matches that are embedded in words.
Skip Inactive Code
If enabled, then only code that is active under conditional compilation is searched. You must first specify known conditions in the Preferences: Languages dialog box, in order for Source Insight to know what conditions are active or not. Conditional compilation only applies to some languages.
Skip Comments
If enabled, then comments will not be searched.
Search Only Comments
If enabled, then only comments will be searched. This is mutually exclusive with the Skip Comments option. The comment options slow the search down a little.
Search Results
These options affect what appears in the Search Results after the search is completed.
List File Names
If checked, then the file name where the match was found is inserted in the search results. If this option is on, and List Line Numbers and List Line Text are both off, then a file name is inserted in the search results only once if any matches were found in the file. That is, only one match per file is listed in the search results.
List Line Numbers
The line number in the file where the match was found is listed in the search results.
List Line Text
The source text of the line where the match was found is listed in the search results.
Include Source Links
If checked, then source links are also created for each line appended to the search results. Source links allow you to jump between the line in the search results and the line in the file where the match was found. Source Links are adjusted automatically while you edit, so they maintain their linkage.
If not checked, then only text is appended to the search results. You may want to turn off this option if you think you will find thousands of matches, since source links take up memory.
Normalize File Names
If checked, then the file names listed in the search results will be normalized. If not checked, then the file names listed will be full paths. See also “Normalized File Names”.
In this section: