How to check the method of a class in idea is called by those classes, and display the call tree corresponding to the method

After the updated version of idea, the shortcut keys that were previously familiar may not work well, and there are still many configurations of idea. Today I want to check when a method is called by other method objects. It alt+7may alt+f7be difficult to use, but it is definitely easy to use the menu bar tool corresponding to the idea.

First of all, as a last resort, we can still use 鼠标右键 --》 Find in Paththe global search in the project. For example, I now want to search for timeFirstmethod calls in the project : I
Insert picture description here
can still find out some things, but we definitely want more than this.
Now, when we select the corresponding method with the mouse, click Navigate --> Call Hierarchy
Insert picture description hereNext in the menu bar, and we can see the corresponding method call chain on the right side of the window.
Insert picture description here
In addition, in the above picture, we can see that Call Hierarchythe shortcut key of the function is Ctrl+Alt+H. This may be different from what we have learned. Of course, this can be modified according to your actual situation later, but you can find the corresponding function through the menu bar to call The method is definitely tried and tested.

Guess you like

Origin blog.csdn.net/qq_41885819/article/details/107038894