

Select View | Tool Windows | Hierarchy from the main menu.Ĭlick the currently displayed tab and select the next one to display from the list. Make sure, you have already built hierarchies to show, see Building hierarchies above.

View hierarchies Open the Hierarchy tool window In the Hierarchy tool window, click the Pin Tab button on the toolbar.

Open a file in the editor and place the caret at the declaration or usage of the desired method or a field.Īlternatively, select the desired method or the field in the Project tool window.įrom the main menu, select Navigate | Call Hierarchy or press Ctrl+Alt+H. Open the file in the editor and place the caret at the declaration of the desired method.Īlternatively, select the desired method in the Project tool window.įrom the main menu, select Navigate | Method Hierarchy or press Ctrl+Shift+H. For more information, refer to Associate scopes with colors. For example, green by default is used for tests. Select the desired class in the Project tool window or open it in the editor.įrom the main menu, select Navigate | Type Hierarchy or just press Ctrl+H.ĭifferent colors of elements stand for different scopes to which these files belong. You can retain the current tab and have the next hierarchy built in a new one. By default, every new built hierarchy overwrites the contents of the current tab. When built, a hierarchy can be immediately viewed and examined in the Hierarchy tool window. If you invoke the call hierarchy on a field, it will show you the list of the methods where the selected field is used. Ĭall hierarchies show callers (supertypes) or callees (subtypes) of a method. When a method is not defined in a class, but is defined in the superclass, IntelliJ IDEA displays. In the hierarchy tree, IntelliJ IDEA displays to indicate subclasses that are not abstract but don't have the method defined in them. Method hierarchies show subclasses where the method overrides the selected one as well as superclasses or interfaces where the selected method gets overridden. Type hierarchies show parent and child classes of a class. With IntelliJ IDEA, you can examine the hierarchy of classes, methods, and calls and explore the structure of source files.
