Red Hat Docs  >  Manuals  >  EDK Manuals  > 

Contents

Previous

Next


Cross-Reference Browser  

The Cross-Reference Browser shows you where elements in your program are used or accessed. It can find every call of a function, or tell you everything a particular function calls. It 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 is used in the context of another symbol, which is in turn 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, the Cross-Reference tool button is disabled (grayed-out). After the database is built, the Cross-Reference tool can be opened.

Although you can always start the Cross-Reference Browser from the Windows menu by selecting New View -> Xref, you may want to start the Cross-Reference Browser 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-Reference 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-Reference Browser window. The references that Refer-to the root symbol are indicated by connecting lines and those that are Referred-by are indicated by connecting 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 Browser Window.

Cross-Reference Browser Window

The Remove Subnodes button allows you to remove displayed subnodes from the hierarchy tree view.

To set the number of subnode levels to display, enter a positive integer in the Levels text entry box.

Double-clicking a symbol in the Cross-Reference Browser 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.

Cross-Reference Filter

Click the Filter icon to bring up the Filter dialog. The symbols displayed by the Cross-Reference Browser are included based on these settings.

Cross-Reference Filter

All
Sets all non-Access selections.

None
Clears all non-Access selections.

Cross-Reference Browser Details

Holding down the right mouse button on a symbol in the Cross-Reference Browser brings up a popup 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.

Cross-Reference Browser, Right Mouse Button Down

Choosing Details By brings up a window that shows where each symbol in the list is referenced.

Cross-Reference Browser Showing Details By Window

Clicking on the column headers allows you to sort by the selected 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 (from the Windows menu, select Add View -> Editor), the Editor shows where that symbol is referenced.

Editor Showing Referencing of Symbol

Cross-Reference Preferences

Preference settings for the Cross-Reference Browser are located in the Xref tab of the Preferences dialog.

  1. In the Symbol Browser, from the File menu, select Project Preferences. In the Cross-Reference Browser, from the Edit menu, select View Preferences.
  2. Choose the Xref tab.

Cross-Reference Tab of the Preferences Dialog

Cross-referencing

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.

Note

Parsing is much slower when cross-referencing local variables. Also, the database size grows considerably when generating local variable cross-references. Make sure that you have an adequate amount of disk space (approximately 10 times the space used by your source code).

Audible alert when complete
Selecting this causes a bell to ring when cross-referencing is complete.

Layout

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-Reference Browser 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-Reference Browser window.

Horizontal space:
Enter the number of horizontal pixels between symbols in the Cross-Reference Browser window.


Contents

Previous

Next