I am curious to know if eclipse has the feature of showing all the list of classes that are extending the current class. This feature is available in INTELLIJ..any ideas.
To get there, we go to the menu under Navigate > Open Type in Hierarchy or we use the shortcut: Ctrl + Shift + H on a PC or Cmd + Shift + H on a Mac. This dialog is similar to the Open Type dialog. Except for this time when we click on a class, then we get the Type Hierarchy view.
If you are extending another class, you can specify the superclass (parent class) either by typing its package and name (e.g. package = "java. lang.", class = "Object", so type "java. lang.
-Or- press Ctrl+Shift+T (for a type) or Ctrl+Shift+M (for a method). The "Open Type/Method" dialog will appear. If a type/method was previously selected in the editor or outline views, it will be displayed.
Open Java Search, enter the interface name, click "Implementors" and you will "find which classes implement a particular interface."
Others have mentioned the Type Hierarchy View. There's also the Quick Type Hierarchy: Ctrl + T
The Type Hierarchy View.
The type hierarchy tree shows supertypes, subtypes or both of a given type depending on the selection made in the toolbar.
"Show the Subtype Hierarchy": This command displays the subtypes of the selected class and/or all implementors of the interface in the Hierarchy view. The tree starts at the selected type and displays the result of traversing down the hierarchy
It's called Type Hierarchy. Default keyboard shortcut key is F4.
There's couple of ways to do this.
1) Open the code, click it's class declaration and press F4 or Right click and select "Open Type Hierarchy F4" menu option.
2) Right Click on the source File, and select "Open Type Hierarchy F4"
PS. For more Eclipse Shortcut key, press Ctrl+Shift+L or select "Help"->"Key Assist.... Ctrl+Shift+L" menu option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With