Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse - change order for Open Declaration / Implementation / Return Type

If I press Ctrl and the mouse is over a method call, a menu is opened:

Open Declaration

Open Implementation

Open Return Type

If I hit Ctrl + click on the method call, the first option will be considered (Open Declaration).

I want to change the order of these options to:

Open Implementation

Open Declaration

Open Return Type

Is it possible to achieve the second order? ( or to let them in the same order but change "the default" for Ctrl + click to be Open Implementation )

I know that I can uncheck the "Open Declaration" from Window > Preferences > General > Editors > Text Editors > Hyperlinking , but I'd like to have all options there with Open Implementation as default.

Details

  • O.S.: Windows 7
  • IDE: Eclipse Luna (4.4)
  • Picture (default):

    enter image description here

like image 413
ROMANIA_engineer Avatar asked Sep 24 '14 08:09

ROMANIA_engineer


2 Answers

I don't think you can re-order the priorities, but as a workaround you can change the modifier keys for Open Implementation so that you can invoke it directly without the other options getting in the way. In the Preferences dialog, search for "hyper" in the search box (without the quotes), select Hyperlinking and then select the Open Implementation entry. At the bottom of the list, you can change the modifiers (for example, I set it to Ctrl + Alt).

enter image description here

like image 193
E-Riz Avatar answered Oct 30 '22 23:10

E-Riz


An answer to a similar question may also work for you: https://stackoverflow.com/a/2106233/2683059

It suggests you try a plug-in for eclipse - http://eclipse-tools.sourceforge.net/implementors/ which will enable the functionality you are looking for.

Instructions:

In Eclipse select Help > Install new software

click 'Add' to add a new update site and enter http://eclipse-tools.sourceforge.net/updates/

in the Filter box type 'Implementors'

check the plug-in and click Next > then complete the install

like image 44
tempcke Avatar answered Oct 30 '22 23:10

tempcke