Displaying a Symbol Definition or Reference

Overview/Tasks

Using the Browse toolbar, you can quickly display the definition or reference of a symbol. The development environment opens the source file containing the first definition or reference and highlights the symbol. To see the next definition or reference, click the Next Definition/Reference button on the toolbar.

To display the definition or reference of a symbol using the Browse toolbar

  1. Select the symbol in a source file or the standard toolbar Find box.

    You can use the asterisk as a wildcard to match any string.

  2. On the Browse toolbar, click either the Go To Definition or Go To Reference button.

  3. If the symbol is a member of more than one class, the Resolve Ambiguity dialog box appears. Select the symbol that you want from the list.

To display the definition or reference of a symbol using the right mouse button

  1. Point to the symbol in a source file (either a text editor window or the pane containing ClassView), and click the right mouse button.

  2. On the pop-up menu, click either Go To Definition or Go To Reference.

To display the definition or reference of a symbol using the Go To dialog box

  1. On the Edit menu, click Go To.

  2. In the Go to what list box, click either Definition or Reference.

  3. Enter the additional selection criteria.

  4. Click one of the navigation buttons: Go To, Previous, or Next.

To display the definition or reference of a symbol using the Definitions And References window

  1. Select the symbol in a source file or the standard toolbar Find box.

    You can use the asterisk as a wildcard to match any string.

  2. On the Tools menu, click Source Browser.

  3. In the Select Query list box, click Definitions And References.

  4. Click OK.

  5. If the symbol is a member of more than one class, the Resolve Ambiguity dialog box appears. Select the symbol that you want from the list.

  6. In the Definitions And References window, double-click the definition or reference you want to see.

    The Definitions And References window appears, with the selected symbol displayed at the top of the left pane. The following figure shows an example.

Definitions and References Window

The following table describes the Definitions And References window elements, the function of each element, and the user's actions.

Definitions and References Window

Window
element

Function

Action
Left pane Displays the selected symbol, or a list of the matching symbols if you used a wildcard. If the symbol is not fully qualified, it is followed by the symbol's type. To display information for a symbol, click the symbol name. To open the source file for a symbol, double-click the class name or folder icon.
Right pane Displays definitions and references for the symbol currently selected in the left pane. Double-click the definition or reference you want to see.
Pushpin Determines whether or not the window disappears after it loses focus. Select to push or pull the pin.
Help button Displays help for the window. Select for help.

Note   The browse file is based on the state of the source files at the time of the last build. If you edit source files and then go to a definition or a reference, the location in the browse file may no longer be accurate. When you issue a query, if the browse file has not been built (or is not current), a dialog box is displayed with the option of building the browse file.