Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Eclipse shows what are the list of classes extending current class

Tags:

eclipse

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.

like image 218
GustyWind Avatar asked Jan 20 '10 03:01

GustyWind


People also ask

How can I see all classes in Eclipse?

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.

How do you extend a class in Eclipse?

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.

How do I get a list of methods in Eclipse?

-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.

How do I find the implementation class of an interface in Eclipse?

Open Java Search, enter the interface name, click "Implementors" and you will "find which classes implement a particular interface."


3 Answers

Others have mentioned the Type Hierarchy View. There's also the Quick Type Hierarchy: Ctrl + T

like image 109
Fabian Steeg Avatar answered Oct 21 '22 14:10

Fabian Steeg


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

like image 22
JuanZe Avatar answered Oct 21 '22 14:10

JuanZe


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.

like image 44
Buhake Sindi Avatar answered Oct 21 '22 13:10

Buhake Sindi