快速调用层次结构的 Intellij 快捷方式

是否有一个快捷键,以快速菜单格式打开与代码内联的方法的调用层次结构,而不是打开调用层次结构面板?

79173 次浏览

If you just want to jump to one of the callers of the method, CTRL + ALT + F7 is the way to go. On a Mac, use: Command + Option + F7

There is a 'Default Keymap Reference' on the 'Help' menu

I don't think the inline method call hierarchy exists (please enlighten me if I am wrong).

  • Ctrl + Alt + H shows the call hierarchy in the tool window
  • Alt + F7 opens the dialog to find the usages
  • Ctrl + F7 finds the usages in the same file

Don't forget you can always do the action name search with Command + Shift + A and search for "call", amongst other commands.

To be complete: for the Mac user

Press command + alt + F7

For Mac: Ctrl + Option + H Choose "Callee Methods Hierarchy" would be better.

+ + F7

PS: Modified terms (e.g. no more alt) in newer Macs

  • Call Hierarchy:
    • macOS: ^ + + H
    • windows: Ctrl + Alt + H
  • Find Usages:
    • macOS: + F7
    • windows: Alt + F7
  • Declaration:
    • from declaration, shows dropdown menu of usages
    • from usage, jumps to declaration
    • macOS: + B
    • windows: Ctrl + B

Type hierarchy can be also useful sometimes (shows the parent and child classes of the current class):

Press Ctrl+H