Cross References

Frozen Content

The following content has been imported from Legacy Help systems and is in the process of being checked for accuracy.

Function

The Cross References panel enables you to quickly locate all occurrences of a variable, function or procedure, within the source code documents of an embedded project.

Content and Use

Information in the Cross References panel will only appear after right-clicking on an identifier in the source code (variable, function or procedure) and choosing the Show Cross References command from the subsequent pop-up menu that appears.

Note: Cross referencing must be set up for the source code documents for this feature to be available - see Setting up Cross Referencing.
The upper region of the panel lists instances of the selected variable, function or procedure name that have been found within the scope of the search. As you click on an instance, the lower region of the panel will show where in the source code that instance exists.

Double-clicking on an entry in the upper region of the panel will navigate to that item within the source document.

Setting Up Cross Referencing

Before the cross reference information can be returned a reference folder and scope, within which the software can conduct its search for the chosen variable, function or procedure, must be defined. This is carried out on the Embedded System - Libraries page of the Preferences dialog (DXP » Preferences).

The main Library Databases region of the page contains a listing of all currently defined library databases - where each database is actually a uniquely defined and named search scope.

To add a new library database, click on the Add button. The Add Library Database dialog will appear.
This dialog is where you define the scope of the search on which to generate the cross reference information. Use the Library Name field to give the 'search scope' a meaningful name that will distinguish it from other defined search scopes (library databases).
Use the Library Root field to define the root folder in which to conduct the search. Click on the folder icon at the right of the field to open the Browse for Folder dialog, from where you can quickly browse to and select the root folder.
Ensure that the Full Source option is enabled to scan both header files (*.h) and source code files (*.c). If this option is disabled, only header files will be scanned.

Enable the Include Subfolders when Scanning option to extend the scope beyond just the root folder, or if you know that the source code is divided over multiple descendant folders.
After defining the search scope as required, click OK - the entry will appear in the Library Databases list.
After defining one or more library databases as required, ensure that the Create Cross-Reference Info option is enabled, at the bottom of the Embedded System - Libraries page, so that the results of a cross reference search are made available in the Cross References panel.

Notes

Use the keyboard Up Arrow and Down Arrow keys to move quickly through listed instances of a variable, function or procedure in the upper region of the panel.

See Also

You are reporting an issue with the following selected text and/or image within the active document: