https://www.jetbrains.com/help/idea/viewing-structure-and-hierarchy-of-the-source-code.html
With IntelliJ IDEA, you can examine the hierarchy of classes, methods, and calls and explore the structure of source files.
Build hierarchies
-
Type hierarchies show parent and child classes of a class.
-
Method hierarchies show subclasses where the method overrides the selected one as well as superclasses or interfaces where the selected method gets overridden.
In the hierarchy tree, IntelliJ IDEA displays
to indicate subclasses that are not abstract but don't have the method defined in them. When a method is not defined in a class, but is defined in the superclass, IntelliJ IDEA displays
.
- Call hierarchies show callers (supertypes) or callees (subtypes) of a method.
If you invoke the call hierarchy on a field, it will show you the list of the methods where the selected field is used.
When built, a hierarchy can be immediately viewed and examined in the Hierarchy tool window. By default, every new built hierarchy overwrites the contents of the current tab. You can retain the current tab and have the next hierarchy built in a new one.
Build a type hierarchy
-
Select the desired class in the Project tool window or open it in the editor.
-
From the main menu, select
Build a method hierarchy
-
Open the file in the editor and place the caret at the declaration of the desired method.
Alternatively, select the desired method in the Project tool window.
-
From the main menu, select
Build a call hierarchy
-
Open a file in the editor and place the caret at the declaration or usage of the desired method or a field.
Alternatively, select the desired method or the field in the Project tool window.
-
From the main menu, select
Retain a hierarchy tab
-
In the Hierarchy tool window, click the Pin Tab button
on the toolbar.
View hierarchies
Open the Hierarchy tool window
-
Make sure, you have already built hierarchies to show, see Building hierarchies above.
-
Select
Navigate between the tabs
-
Click the currently displayed tab and select the next one to display from the list.
Toggle between views
-
With IntelliJ IDEA, you can build and explore ascending or descending hierarchies, that is, callee or caller methods, parent or children classes, and so on.
Click
or
to show caller methods or callee methods respectively.
Hierarchy tool window buttons
==============
https://www.jetbrains.com/go/guide/tips/call-hierarchy/
Call Hierarchy
Analyze call trees for functions or methods
Call Hierarchy allows you to quickly see all the places where a function or method is used.
How to use:
Press Ctrl + Alt + H on Windows/Linux, ⌥ + ^ + H on macOS, and the Call Hierarchy tool window will open up with all the places that the function is called inside.
Pro tip:
This works for interface methods, type methods, methods, and calls.
You can then drill down into the call chain to see where those other functions are called.
Speed Typing is available to help you quickly navigate to the element you need.
New in 2017.3