Reputation: 43969
In Eclipse, you can select a Java class and show the class hierarchy ("open type hierarchy" or F4 in default bindings). It opens the "Type Hierarchy" view, which lists its base classes and the tree of its subclasses.
I'm sure there is an equivalent in IDEA to get this information but I haven't found it yet.
What workflow is best in IDEA to quickly show the base classes of a given class?
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.
Upvotes: 36
Views: 13425
Reputation: 1116
Is this the feature you are looking for? The shortcut is Ctrl+H
https://www.jetbrains.com/help/idea/viewing-structure-and-hierarchy-of-the-source-code.html
Ctrl+Alt+U also shows a type hierarchy: How to show all parents and subclasses of a class in IntelliJ IDEA?
Upvotes: 43
Reputation: 8598
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
.
Note: I am using IntelliJ IDEA 12.0.1 ultimate.
Upvotes: 5