CLion 2021.3 Help

Hierarchy tool window

View | Tool Windows | Hierarchy

You can update the previously built hierarchy by clicking the Refresh icon the Refresh button in the Hierarchy tool window. Alternatively, the results are updated when you run the next hierarchy command (unless you pinned the Pin button the tab with one of the previously built hierarchies).

Toolbar buttons

Item

Description

Available In

Hierarchy

Shows both the parent and child classes of the selected class, which is marked with an arrow in the tree of results.

Type hierarchies

the Supertypes Hierarchy button

Depending on the hierarchy type:

  • Class hierarchies: shows the hierarchy of each supertype of the current class.

  • Call hierarchies: shows the callers of the selected method.

All hierarchies

the Subtypes Hierarchy button

Depending on the hierarchy type:

  • Class hierarchies: shows all classes that extend the selected class.

  • Call hierarchies: shows the callees of the selected method.

All hierarchies

the Sort Alphabetically button

Sorts all elements within a tree alphabetically.

All hierarchies

Scope

Use this list to limit the scope of the current hierarchy:

  • Project: traces usages of the method across the project.

  • Test: traces usages of the method across the test classes.

  • All: traces usages of the method across the project and the libraries.

  • This class: limits the scope to the current class.

In addition to the preconfigured scopes, you can define your own one. To define a scope, select Configure from the list, and define the required scope in the Scopes dialog.

Call hierarchies

In a method hierarchy, the tree views of the following classes are available:

  • the Plus icon: the method is defined.

  • the Minus icon: the method is defined only in the superclass.

  • the Exclamation mark icon: the method must be defined because the class is not abstract.

the Refresh button

Shows all updated classes or class structures.

All hierarchies

the Navigate with Single Click button

Moves to a file and a section in a source code that corresponds to the selected node in the hierarchy tree.

All hierarchies

the Expand All button

Expands all nodes.

All hierarchies

the Pin button

Locks the current tab from closing and reusing. Results of the next command are displayed in a new tab.

All hierarchies

the Export to Text File

Exports a hierarchy into a text file. You can specify a location for this file.

All hierarchies

the Close button

Closes the tool window.

All hierarchies

Last modified: 12 October 2021