For every version of Eclipse I've used prior to Juno, ctrl+click would find the declaration of a variable/class/method. It was an extremely useful feature when dealing with a large code base. How do I get Juno to do this?
In Project Explorer, right-click the file in which Ctrl+Click was not working in Eclipse, and select Index -> Freshen All Files. That solved the problem of Eclipse not going to / not finding function declaration (via Ctrl+Click or F3).
Right Click on the project -> Properties -> Project Facets -> Click on the Configuration Link -> Click on Apply Button -> Click on OK button.
I can confirm that Ctrl + click works fine with the following :
Eclipse Java EE IDE for Web Developers. Version: Juno Release Build id: 20120606-2254 Operating System : Windows 7, 64 Bit
What do you have for the following preference ?
On Window -> Preferences -> General -> Editors -> Text Editors -> Hyperlinking -> Open Declaration
Here is what I had for a new workspace in Juno :
Update
I have not experienced this in the recent past, but I vaguely remember encountering this problem in previous Eclipse releases (Galileo and earlier).
All of what follows is worth doing only if we are sure that it's a problem with the Eclipse workspace. A quick way of checking this is to restart eclipse with a new workspace (Do this by going to File -> Switch Workspace -> Other... and choosing the path to a folder which is preferably empty and different than the current workspace folder).
If things worked in the new workspace, my fix then was one of the following, in increasing order extremeness :
-clean
parameter to clean out the workspace ( See this). This might specially be worth doing if you used a workspace from an older version of eclipse.WORKSPACE_FOLDER/.metadata/.plugins/org.eclipse.jdt.core
For me it helped to simply close the edited source file and reopen it. If this doesn't work THEN you can try restarting whole IDE.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With