21

When I check the type hierarchy of a class that is derived from an interface in Eclipse, it doesn't show the interfaces. Is there a way to configure Eclipse to display the interfaces in the type hierarchy? Or is there any other way to see this information?

Pops
  • 30,199
  • 37
  • 136
  • 151
oshai
  • 14,865
  • 26
  • 84
  • 140

2 Answers2

26

Did you click on "Show the Supertype hierarchy?

Because in this case, it will show the interfaces.

alt text

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
24

CTRL-T is what you want.

Highlight the name of the class in the editor, hit CTRL-T twice. This will show you the supertype hierarchy in a little popup.

But wait, it gets better. Go to your interface. Put your cursor on a definition. CTRL-T (once) will show you all the classes that implement the interface. If you select one of these classes in the popup, it will take you straight to the implementation of the function you had your cursor on.

There, navigation between interfaces and their implementations just became a whole lot easier. Since I discovered this, I hardly ever use the Hierarchy view anymore.

Jan Schiefer
  • 1,003
  • 7
  • 15
  • 1
    On OSX, the shortcut is `⌘T` – pimlottc Apr 07 '15 at 17:44
  • 1
    this only show the super-type interface. if your class extends a class AND implements several other interfaces, this will not show thoses interfaces. Best answer is the @VonC one. – Donatello May 03 '16 at 07:31