1

I am using a method annotated with @Override. in case this overrides a class I am using Ctrl-t and can navigate to the declaring type. is there a way to get to the declaration in case this is an interface?
I asked another question that is similar, but this question is more precise to my needs.

Community
  • 1
  • 1
oshai
  • 14,865
  • 26
  • 84
  • 140
  • I don't understand what you're saying. The method with `@Override` is it a class, abstract class, interface? and what does `Ctrl+T` has to do with anything? – Buhake Sindi Nov 23 '10 at 09:20

2 Answers2

2

You could go to where the class is declared and F3 on the interfaces that the class implements.

You can also highlight the method and CTRL+ALT+H which will show you where it is called - you can often find the interface there.

You can also go to Window -> Preferences -> Java -> Editor -> Mark occurences and tick Methods implementing an interface (but I find these extra markers annoying)

Hope that helps!

Edit:

It occurs to me that in you have to go to Windows -> Preferences -> General -> Editors -> Text Editors -> Annotations

and select Override Indicators and check the tick box on the right - Show in Vertical ruler for the markers to appear next to your source code (you just click on the marker to go to the declaring interface)

Matt
  • 557
  • 9
  • 17
1

There should be a little hollow upward-pointing triangle in the left margin of the editor. Clicking on that will take you to the declaration.

I think this is what Matt's is talking about in the last paragraph of his answer - but i've never had to switch the triangles on, they're there by default.

Tom Anderson
  • 46,189
  • 17
  • 92
  • 133