Use IDEA tool to view the Java class hierarchy diagram

This article explains how to view the Java class hierarchy diagrams commonly used in IDEA during development.
The first thing that needs to be emphasized is that the version of the idea tool and the operating system platform are different. The interface, function, shortcut keys, etc. will be different, but the overall situation is the same. I am here in IntelliJ IDEA 2019.3. under macOS Big Sur (11.2.3). 1 (Ultimate Edition).


The structure diagram (Structure)
shortcut key command+7, Windows should be alt+7, or you can open it through the menu bar: View->To Windows->Structure, after opening you can see the structure diagram of this class, this is equivalent to eclipse In the outline, click the small icon below to sort, display and hide (attributes, methods, classes), etc.

Hierarchy diagram (Type Hierarchy)
shortcut key control+h, Windows seems to be able to directly press F4, or open through the menu bar: Navigate->Type Hierarchy, you can see the hierarchical structure diagram of this category after opening, click the small icon below You can switch the structure (the class, the parent class, the subclass hierarchy), sort, etc., and you can also export the text content:

Diagrams
shortcut key option+command+u or option+command+shift+u, Windows should be ctrl+alt+u or ctrl+alt+shift+u, or right-click Diagrams -> Show Diagram... or Show Diagram Popup..., you can see the relationship diagram of this category after opening it. Click the small icon below to display details such as attributes, methods, classes, dependencies, etc. You can also export pictures and print content. Select the project and see the entire project. Relationship structure diagram:

You can also right click to do more operations:
 

Original link: https://www.xubingtao.cn/?p=3648

Follow my public account to share all kinds of useful information for you every day.

For more information, please visit my other side:

Guess you like

Origin blog.csdn.net/xubingtao/article/details/115081636