Eclipse editor show variable occurrence
In Eclipse Standard Installation the editor marks all occurrences of a variable if you click on it with a cursor.
e.g. Setting the cursor s开发者_如何学运维omewhere on the 'foo' Variables it highlights all other foo's too.
public void printString(String foo){ System.out.println(foo); }
Any ideas where to switch this behavior on again or why the feature doesn't work ? I know the workaround is 'References->Workspace' but the auto highlighting is much more convenient.
You are asking about the "Toggle Mark Occurrences" the short cut for this is Alt + Shift + O
You can also enable it from
Window > Preferences > Java > Editor > Mark Occurrences
精彩评论