What is the shortcut in IntelliJ IDEA to find method / functions?

前端 未结 16 694

I know that Ctrl + N is to find classes and it is very useful. But what about methods?

相关标签:
16条回答
  • 2021-01-29 18:16

    Windows : ctrl + F12

    MacOS : cmd + F12

    Above commands will show the functions/methods in the current class.

    Press SHIFT TWO times if you want to search both class and method in the whole project.

    0 讨论(0)
  • 2021-01-29 18:17

    CTRL + F12 brings up the File Structure navigation menu, which lets you search for members of the currently open file.

    0 讨论(0)
  • 2021-01-29 18:18

    It is worth adding that if you want to search for a method of a class, you can use a . (dot) between the class and method name inside of either the search everywhere or search symbols dialog. This even works with IDEAs usual search benefits. For example, you can search for LDT.now and LocalDateTime::now will pop up as a result. (As long as you are searching All Files and not just Project Files).

    0 讨论(0)
  • 2021-01-29 18:18

    If I need navigate to method in currently opened class, I use this combination: ALT+7 (CMD+7 on Mac) to open structure view, and press two times (first time open, second time focus on view), type name of methods, select on of needed.

    0 讨论(0)
提交回复
热议问题