CLion 2020.1 Help

Hierarchy tool window

View | Tool Windows | Hierarchy

The Hierarchy tool window becomes available when you call one of the hierarchy actions in your code.

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

ItemDescriptionAvailable 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 buttonSorts 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 buttonShows all updated classes or class structures.All hierarchies
the Navigate with Single Click buttonMoves 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 buttonExpands all nodes.All hierarchies
the Pin buttonLocks the current tab from closing and reusing. Results of the next command are displayed in a new tab. All hierarchies
the Export to Text FileExports a hierarchy into a text file. You can specify a location for this file.All hierarchies
the Close buttonCloses the tool window.All hierarchies
Last modified: 29 June 2020