Go to Related (C++)
Go Up to Search Menu
Search > Go to Related
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.
Contents
Below, you can find the different navigation options according to the element you choose.
Types
- 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.
When you ctrl + click TComponent
and select Go to Member, the wizard displays the member methods, fields, and properties of the TComponent
type.
Methods
- 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
- 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.
AHint
and select Go to Member, the wizard displays all the UnicodeString members.Include File
- 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:
In this example, you can see how it is familiar with C++Builder-isms such as properties:
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:
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.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.