The Cross-Referencer (also called Xref) creates tree diagrams that show essential relationships within the project's symbol database, such as the function call hierarchy tree. You can traverse up and down the hierarchy tree, as well as expand or restrict the tree. You can select items in the hierarchy and display their Refers-to and Referred-by relationships; these relationships are based on the "point-of-view" of the selected symbol.
A Refers-to relationship is one where the selected symbol "points to" another symbol; that symbol, in turn, is Referred-by the selected symbol.
Source-Navigator creates the cross-reference database in the background, which enables you to work in other views during this process. During this process, the Cross-Referencer tool button is disabled (grayed-out). After the database is built, the Cross-Referencer tool can be opened.
Although you can always start the Cross-Referencer by choosing it from the Windows menu (Windows -> New View -> Xref), you may want to start the Cross-Referencer so that it focuses on a specific symbol. To do this, select a symbol in the Symbol Browser or Editor, and then click the Cross-Referencer tool button or choose the Xref tab.
The selected symbol becomes the root symbol in the Symbol Accelerator text box at the top left of the Cross-Referencer window. The references that Refer-to the root symbol are indicated by blue arrows and those that are Referred-by are indicated by red arrows. You can traverse the hierarchy tree by selecting references and clicking the right-pointing hand tool (Refers-to) and left-pointing one (Referred-by) as shown in Cross-Reference Window.
The Remove Subnodes button allows you to remove the display of subnodes from the hierarchy tree.
To set the number of subnode levels that will be displayed, enter a positive integer in the Levels text entry box.
Double-clicking a symbol in the Cross-Referencer window starts the Editor, with the specific symbol in context in the source file. The cross-reference information is stored in the database and is kept current by the Editor.
Click the Filter icon to bring up this dialog. The symbols displayed by the Cross-Referencer are included based on these settings.
Holding down the right mouse button on a symbol in the cross-reference window brings up a menu that allows you to filter the list of symbols you're working with, as well as to gather new information about the symbols you're interested in.
Choosing Details By brings up a window that shows where each symbol in the list is referenced.
Clicking on the column headers allows you to sort the focusing on that column, either alphabetically, by line number, by class, etc. The Pattern text entry box in the window allows you to use a string to filter the list.
Symbols that occur multiple times are listed; when you click on a symbol and then add the Editor to the window (Windows -> Add View -> Editor) the Editor shows where that symbol is referenced.
Preference settings for the Cross-Referencer are located in the Xref tab of the Preferences dialog. Select File -> Project -> Project Preferences... from the Symbol Browser or Edit -> View Preferences... from the Cross-Referencer. Choose the Xref tab.
Build Cross-Reference
database
Select this if you would like Source-Navigator to build the cross-reference
databases for your project. This is on by default.
Generate
references to local variables
Select this if you would like cross-reference information for local
variables. This is off by default.
Audible alert when complete
Selecting this causes a bell to ring when cross-referencing is complete.
Compare parameters
Select this to generate cross-references only when the parameter types
of the Refers-to and Referred-by symbols match. Deselecting
this allows symbols to be considered matches, regardless of differences
in parameters.
Compare static information
Select this to generate cross-references only when both the Refers-to
and Referred-by static attributes match.
Display parameter list
Select this to display parameters with the symbol in the cross-referencer
window.
Display boxes
Select this to surround cross-reference nodes with boxes.
Display order:
Left to right displays the cross-reference hierarchy from left
to right; Top to Bottom displays it from top to bottom.
Display layout style:
Select Tree to display cross-references in tree layout; select
ISI to display them in ISI layout.
Vertical space:
Enter the number of vertical pixels between symbols in the Cross-Referencer
window.
Horizontal space:
Enter the number of horizontal pixels between symbols in the Cross-Referencer
window.