ctrl-click goes to the declaration of the method I clicked. For interfaces with one implementation, how can I just directly go to that implementation?

北战南征 提交于 2019-11-28 04:30:00

The Implementors plugin does pretty much exactly what you ask for. If there is only one implementation it will open it directly, otherwise it will let you choose.

meriton
  1. Move the cursor to the method call
  2. Press Ctrl + T
  3. Select your desired implementation
  4. Hit Enter

This also works if there are several implementors.

Go to Window > Preferences > General > Editors > Text Editors > Hyperlinking, and uncheck Open Declaration.

From now on, when you hold Ctrl while hovering over a method name, the following popup will be displayed. Just click on the method name and the implementation will be opened (or a Types implementing XXX box, if more than one implementation exists).

You will still be able to use the Open Declaration feature by pressing F3.

Stephen Denne

In Eclipse 3.5, when you hover over doThings while holding down the control key, a pop up box gives you two options to click on:

  • Open Declaration
  • Open Implementation

There's a screenshot as the second section of the Eclipse 3.5 New & Noteworthy page for JDT:

In Eclipse IDE for C/C++ Developers Version: Oxygen.3a Release (4.7.3a) I saw Ctrl+Tab (Toggle Source/Header) which worked for me (although not directly but its a workaround).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!