18

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 somewhere 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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Martin Dürrmeier
  • 1,653
  • 5
  • 18
  • 35

2 Answers2

38

You are asking about the "Toggle Mark Occurrences" the short cut for this is Alt + Shift + O

6

You can also enable it from

Window > Preferences > Java > Editor > Mark Occurrences
CodeBlue
  • 14,631
  • 33
  • 94
  • 132