Jump into interface implementation in Eclipse IDE

后端 未结 11 1101
陌清茗
陌清茗 2020-12-12 09:37

You know how in Eclipse, pressing F3 over a method will take you to its declaration? Well I have a method that is part of an interface; clicking F3 ove

相关标签:
11条回答
  • 2020-12-12 10:22

    See In eclipse, ctrl-click goes to the declaration of the method I clicked. For interfaces with one implementation, how can I just directly to that implementation? for some alternative solutions.

    • Anyway, I think you might be looking for something like this:

    http://eclipse-tools.sourceforge.net/implementors/

    0 讨论(0)
  • 2020-12-12 10:23

    Here is what I do:

    I press command (on Mac, probably control on PC) and then hover over the method or class. When you do this a popup window will appear with the choices "Open Declaration", "Open Implementation", "Open Return Type". You can then click on what you want and Eclipse brings you right there. I believe this works for version 3.6 and up.

    It is just as quick as IntelliJ I think.

    0 讨论(0)
  • 2020-12-12 10:24

    The best solution would be Ctrl+Alt+I.

    0 讨论(0)
  • 2020-12-12 10:28
    ctrl + mouse hover + click "Open Implementation"
    

    On ctrl + hover, you should see the following menu:

    Tested on Eclipse Mars.2 (4.5.2)

    0 讨论(0)
  • 2020-12-12 10:30

    Press Ctrl + T on the method name (rather than F3). This gives the type hierarchy as a pop-up so is slightly faster than using F4 and the type hierarchy view.

    Also, when done on a method, subtypes that don't implement/override the method will be greyed out, and when you double click on a class in the list it will take you straight to the method in that class.

    0 讨论(0)
提交回复
热议问题