How to show all parents and subclasses of a class in IntelliJ IDEA?

前端 未结 15 1995
没有蜡笔的小新
没有蜡笔的小新 2020-12-07 14:35

When I\'m editing a Java class in Eclipse, when my cursor is over a class variable, I can do Ctrl+T to have a popup that shows all its parents and subc

相关标签:
15条回答
  • 2020-12-07 14:50

    Ctrl+U - go to base class

    Ctrl+Alt+B - got to implementation. Type parts of class name to narrow down the list

    Ctrl+H - open type hierarchy tool window

    Ctrl+Alt+U - peek class/interface inheritance hierarchy

    0 讨论(0)
  • 2020-12-07 14:51

    For Mac Users, the shortcut is

    ^(control) + h

    0 讨论(0)
  • 2020-12-07 14:54

    Navigate | Type Hierarchy Ctrl+H will show similar information, however in the Panel. You can Float and Unpin the Panel so that it appears on the fixed display position only when you use the keyboard shortcut.

    0 讨论(0)
  • 2020-12-07 14:54

    In terms of behavior the equivalent of Eclipse Ctrl+T in IntelliJ IDEA is Ctrl+Alt+B

    0 讨论(0)
  • 2020-12-07 14:56

    Intellij does - in contrast to Eclipse - distinguish between type hierachies and implementation classes. I'm still undecided whether this is a good thing or not (just switched over from Eclipse to Intellij myself)

    On a Mac Intellij 14

    • Ctrl + H will bring up the type hierarchy showing you sub- and supertypes
    • Cmd + Alt + B will show you all implementing classes and subclasses of the interface/class you're interested in
    0 讨论(0)
  • 2020-12-07 14:58

    Whilst Eclipse includes the type hierarchy and class structure (methods, fields etc.) in a single view, IntelliJ splits these up: In addition to the CTRL+H (or ALT+8) "Type Hierarchy" view, the other relevant IntelliJ window is called "Structure" and can be invoked via ALT+7 (Structure Tool Window) or CTRL+F12(Structure popup).

    (Not a direct answer to the exact question posted but would expect others from an Eclipse background may arrive here having googled for "intellij type hierarchy", as I did.)

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