JetBrains/IntelliJ 用于折叠所有方法的键盘快捷键 [英] JetBrains / IntelliJ keyboard shortcut to collapse all methods
本文介绍了JetBrains/IntelliJ 用于折叠所有方法的键盘快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在处理一些遗留代码,其中的类包含 10,000 多行代码和 100 多种方法.是否有任何 JetBrains IDE 的快捷方式(因为快捷方式可能会在所有这些 IDE 之间共享)来折叠所有方法/函数,以便仅显示方法签名?
I'm working on some legacy code that has a class that is 10,000+ lines of code and has 100s of methods. Is there a shortcut for any JetBrains IDE (since the shortcut would likely be shared across all of them) to collapse all the methods / functions so that only the method signatures are shown?
像这样:
public String myMethod(String arg1, int arg2){...}
public String mySecondMethod(String arg1, int arg2){...}
推荐答案
你可以看看 intellij 代码折叠快捷方式.
对于 Windows/Linux 执行:Ctrl+Shift+-
For Windows/Linux do: Ctrl+Shift+-
Mac 使用 Command+Shift+-
再次展开 Ctrl+Shift++ 或 Command+Shift++ 分别.
To unfold again do Ctrl+Shift++ or Command+Shift++ respectivley.
这篇关于JetBrains/IntelliJ 用于折叠所有方法的键盘快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文