IDEA 相当于 Eclipse“类型层次结构”(F4)?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17571348/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
IDEA equivalent of Eclipse "type hierarchy" (F4)?
提问by Philipp Cla?en
In Eclipse, you can select a Java class and show the class hierarchy ("open type hierarchy" or F4in default bindings). It opens the "Type Hierarchy" view, which lists its base classes and the tree of its subclasses.
在 Eclipse 中,您可以选择一个 Java 类并显示类层次结构(“开放类型层次结构”或F4在默认绑定中)。它打开“Type Hierarchy”视图,其中列出了它的基类和它的子类树。
I'm sure there is an equivalent in IDEA to get this information but I haven't found it yet.
我确信 IDEA 中有一个等效的东西来获取这些信息,但我还没有找到。
What workflow is best in IDEA to quickly show the base classes of a given class?
IDEA 中哪种工作流程最适合快速显示给定类的基类?
Visualizing the subclasses is nice to have but less critical for me. In the editor, I can find the immediate subclasses easily via the "has subclasses" button on the left pane.
可视化子类很好,但对我来说不那么重要。在编辑器中,我可以通过左侧窗格中的“具有子类”按钮轻松找到直接子类。
回答by joe776
Is this the feature you are looking for? The shortcut is Ctrl+H
这是您正在寻找的功能吗?捷径是Ctrl+H
http://www.jetbrains.com/idea/webhelp/building-class-hierarchy.html
http://www.jetbrains.com/idea/webhelp/building-class-hierarchy.html
Ctrl+Alt+U
also shows a type hierarchy: How to show all parents and subclasses of a class in IntelliJ IDEA?
Ctrl+Alt+U
还显示了一个类型层次结构:如何在 IntelliJ IDEA 中显示一个类的所有父类和子类?
回答by Alexey Odintsov
Try use Ctrl+H Hierarchy class panel should show.
尝试使用 Ctrl+H Hierarchy 类面板应该显示。
回答by Kuldeep Jain
Another option is to set the Keymap
to Eclipse
in IDE Settings and you would continue to be able to use F4
. Go to Settings using Ctrl+Alt+S
type Keymap in search box and change Keymaps to Eclipse
.
另一种选择是设置Keymap
到Eclipse
IDE中的设置,你会继续能够使用F4
。Ctrl+Alt+S
在搜索框中使用Keymap 类型转到 Settings 并将Keymaps 更改为Eclipse
。
Note: I am using IntelliJ IDEA 12.0.1 ultimate.
注意:我使用的是 IntelliJ IDEA 12.0.1 Ultimate。