Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse mark occurrences doesn't mark all occurrences

Tags:

eclipse

Just installed Eclipse Juno Release, Build id: 20120614-1722.

I have 'Mark Occurrences' turned on, and I can see that it does indeed mark some of the occurrences in the JS file I'm editing. However, there's a function call that it doesn't mark.

var trackView = function() {
    saveData();
},
saveData = function() {
    // do something
};

When I click into the saveData occurrence where it is defined (line 4), it highlights, but it doesn't highlight the occurrence on line 2 where the function is being called. When I click into the saveData occurrence on line 2, neither highlights.

Any ideas?

like image 918
Jeff Ludden Avatar asked Aug 29 '12 23:08

Jeff Ludden


4 Answers

The bug report in Eclipse also mentions another workaround: select something in the Outline view, and then select the field in your source again.

This works mostly always for me.

like image 179
Tom Avatar answered Sep 21 '22 17:09

Tom


If you toggle from eclipse window to another window using ATL+TAB and come back to Eclipse window it is higlighted.

like image 34
Subas Raj Avatar answered Sep 21 '22 17:09

Subas Raj


This is a known bug in Eclipse Juno and is actively (as of this writing) being investigated by Eclipse developers.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=400661

https://bugs.eclipse.org/bugs/show_bug.cgi?id=398509


UPDATE 6/2: This bug has been resolved in Release 4.2.2

https://bugs.eclipse.org/bugs/show_bug.cgi?id=398509

like image 39
Doug Ayers Avatar answered Sep 19 '22 17:09

Doug Ayers


If you uncheck the below option it will work fine

Preference > Java > Editor > Mark Ocurrences > Uncheck: Keep marks when the selection changes.

like image 38
Sniper Avatar answered Sep 20 '22 17:09

Sniper