Go to Related (C++)

From RAD Studio
(Redirected from Show Type Hierarchy (C++))
Jump to: navigation, search

Go Up to Search Menu

Search > Go to Related

Note: This feature comes through Visual Assist.

The Go to Related feature shows a popup menu with a variety of different navigation options depending on the selected item, type, method, or variable. Each item is designed to be practical and useful to navigate.

Available Navigation Options

Below, you can find the different navigation options according to the element you choose.

Types

VA GotoRelated Types.png

  • Definition: Navigate to where the type is implemented.
  • Declaration: Navigate to where the type is defined.
  • Base classes: Open a submenu listing all base classes. Clicking one takes you to that class’s definition.
  • Derived classes: Open a submenu listing all derived classes. Clicking one takes you to that class’s definition.
  • Constructor: Take you to its declaration.
  • Go to Member: Display a dialog letting you search for and navigate to any member variable, method, or C++Builder/Delphi property.

VA GotoRelated TypesMembers.png

When you ctrl + click TComponent and select Go to Member, the wizard displays the member methods, fields, and properties of the TComponent type.

Methods

VA GotoRelated Methods.png

  • Base symbols: Show each ancestor class’s implementation of the same virtual method.
  • Derived symbols: See each derived class’s overriding implementation of the same virtual method.
  • Go to Member: Displays a dialog letting you search and navigate to any member field, method, or property of the type method belongs to.

Parameters / Variables

VA GotoRelated VariablesI.png

  • Type of Symbol: Navigate to the declaration of the Variable’s type. In the screenshot above, note that you can visit the type of the template and the template parameter types.
  • Go to Member: Allow you to navigate to any member of the variable’s type.

VA GotoRelated VariablesMembers.png

Note: In the screenshot above, when you ctrl + click the parameter AHint and select Go to Member, the wizard displays all the UnicodeString members.

Include File

VA GotoRelated IncludeFile.png

  • Open File: Open the file in the editor. If you want to perform this action quickly, press Ctrl+Enter on your keyboard.
  • Open Containing Folder: Open the Explorer with the file selected.
  • Includes: Show a submenu with an Include File content list. Clicking an entry navigates there.
  • Included By: Displays a submenu with a list of the files that include this one. Clicking an entry navigates to that file.

General

Go to Related works on other symbols. This is an example of a macro:

VA GotoRelated Declarations.png

In this example, you can see how it is familiar with C++Builder-isms such as properties:

VA GotoRelated GeneralI.png

You can change the property visibility by redeclaring it, and this is what is visible in the example above. In this example, ctrl-clicking on a property getter, inside a property declaration, understands the referred method and lets you navigate to it:

VA GotoRelated GeneralII.png

Note: In this case, GetNeighbour is the getter for this property. Selecting ‘Definition’ or ‘Declaration’ in the menu takes you to where the property getter GetNeighbour is implemented or defined.
Attention: Go to Related replaces the old Find Declaration, which as a standalone menu item is now only available for Delphi. Go To Related’s functionality includes Find Declaration plus much more.

Navigating Across Your Project

Go to Related definition replaces the old Find Declaration. Its functionality includes Find Declaration plus many others.

To navigate across the project, you can also use Ctrl+Shift+Up/Down arrow between the declaration and implementation of a method.

When you press Ctrl+Shift+Down inside an inactive macro/ifdef, it will jump to the implementation of the next method declared.

See Also