Window»Source Code Browser/View»Browse Identifier
The Source Code Browser is a cross-reference tool that lists selected files, functions, variables, data types, and macros in a program. You can use the browser to identify how different parts of a program interact with each other. By default, LabWindows/CVI generates source code browse information at edit time. To disable browse information generation or change when LabWindows/CVI generates it, modify the Generate browse information policy option in the Environment Options dialog box.
The Source Code Browser contains three columns: Matches Found, Views, and Results. The Matches Found column displays the item—file, variable, macro, and so on—for which to access browse information. The Views column contains categories of browse information available for the item you select in the Matches Found column. The Results column contains browse information based on the item you select in the Views column.
You can use one of the following methods to access the Source Code Browser:
- Select Window»Source Code Browser. If you use this method to access the Source Code Browser, LabWindows/CVI creates an unnamed tab in the Source Code Browser.
- Place the cursor over a function, variable, data type, or macro in the code and press <Ctrl-F1>.
- Right-click a .c or .prj filename in the Project Tree and select Browse "filename".
- Right-click in a source file and select Browse Identifier.
- Select a variable name in the Variables and Call Stack or Watch window and select View»Browse Identifier.
You can type a substring or the entire name of a file, function, variable, data type, or macro in the Identifier/Filename control of the Source Code Browser to access browse information about all items that match the string. Wildcards are not supported, and the search is not case sensitive. All search matches appear in the Matches found column.
Browsing on Files
If you browse on a file, you can choose from the following items under the Views column. The availability of certain items depends on the type of file selected.
- Functions—The functions defined in the file. The line number where the function is defined is listed next to the function name. Static functions also are identified next to the function name.
- Included headers—A hierarchical display of included files in the file, arranged in the order in which they are included.
- Macros—The macros in the file. The line number where the macro is defined is listed next to the macro name.
- Modules—The program files in the project.
- Referencing—A hierarchical list of variables and functions defined in another file that are explicitly referenced in the file. The variables and functions are grouped according to module.
- Referenced from—The functions and variables defined in the file that are referenced from another file. The variables and functions are grouped according to module.
- Types—The data types defined in the file. The type and line number where the type is defined are listed next to the type name.
- Variables—The variables defined in the file. The line number where the variable is defined is listed next to the variable name. Static variables also are identified next to the variable name.
Browsing on Functions
If you browse on a function, you can choose from the following items under the Views column:
- Declarations—The file and line number where the function is declared.
- References—A hierarchical list of files where the function is referenced.
- Calling—A hierarchical list of the functions that the function calls and the number of references for each of the called functions.
- Called from—A hierarchical list of functions that call this function and the number of references for each of the calling functions.
Browsing on Variables, Data Types, and Macros
If you browse on a variable, data type, or macro, you can choose from the following items under the Views column:
- Declarations—A list of files and line numbers where the variable, data type, or macro is declared.
- References—The files and line numbers where the variable, data type, or macro is referenced.
Accessing Context Menu Items in the Source Code Browser
Each item for which you access browse information is included in a separate tab in the Source Code Browser. You can right-click in tab in the Source Code Browser to access the following context menu items. Where you right-click within a tab and which item you have selected determine which context menu items are available.
- Go to Source—Highlights the selected item in the Source window.
Note When you select Go to Source from the Referencing and Referenced from views, LabWindows/CVI highlights the import declaration of the function. - Browse—Opens a new tab that contains browse information for the selected item.
- Browse in this Tab—Displays browse information for the selected item in the tab in which you right-clicked. This information replaces the current information in the tab.
- Find—Opens the Find dialog box, which you can use to search for text in the Results column in the Source Code Browser.
- Close—Closes the selected tab. If there is only one tab in the Source Code Browser, this option closes the Source Code Browser.
- Release/Confine Window—Releases the window from the Window Confinement Region if confined. Confines the window into the Window Confinement Region if released.
Right-clicking on a tab in the Source Code Browser displays the context menu with the following options:
- Close—Closes the window.
- Release Window—Removes the window from the Window Confinement Region.