如何在IntelliJ IDEA项目工具窗口中自动导航到当前类?
问题描述:
我想在IntelliJ IDEA中使用一个键盘快捷键,它具有以下作用:项目工具窗口中的树将展开以显示当前打开的类(或文件),并且该类在树中被选中.
I would like to have a keyboard shortcut in IntelliJ IDEA that has the following effect: the tree in the project tool window expands to show the currently open class (or file), and this class becomes selected in the tree.
这可能吗?
答
Navigate
(旧版本中的 View
)|选择位置...
( Alt + F1 ),项目视图( Enter ).
Navigate
(View
in older versions)| Select In...
(Alt+F1), Project View (Enter).
还可以在 Project View
中启用从源代码自动滚动选项,以便自动选择当前文件.
It's also possible to enable Autoscroll from Source option in the Project View
so that current file is automatically selected.