问题
When I open a Java file for editing in Eclipse, references highlighting works well for a while, but then suddenly stops working after some minutes.
On this example, parameters was the last variable correctly highlighted, but now it's no longer working and not highlighting anything else (it should highlight password):
Toggling Mark Occurrences off and back on doesn't solve it. I've already tried restarting Eclipse and rebooting the computer (had this problem for weeks actually).
The only workaround I found so far is closing the file, and reopening it. But then it stops working again after some time.
For info, I am using Eclipse 4.2.2, on Windows 7 64 bit machine.
回答1:
WORKAROUND: select something in the Outline view (on the right) and then go back to the editor.
(For more info see this bug report)
回答2:
It's already reported as Eclipse Juno issue and the reason is in this bug. Looks like this update should help.
回答3:
Known bug in Juno,this feature goes Off/On frequently. I'm using Alt+Shift+O as workaround!!
回答4:
One solution is to install the next (currently development) version - Eclipse Kepler (4.3) M7 - from http://www.eclipse.org/downloads/index-developer.php. The highlighting issue is fixed there.
But beware it is not release version so something might not be finished yet.
来源:https://stackoverflow.com/questions/15876890/eclipse-stops-highlighting-references-after-a-while