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\' Variab
You are asking about the "Toggle Mark Occurrences" the short cut for this is Alt + Shift + O
Alt + Shift + O
You can also enable it from
Window > Preferences > Java > Editor > Mark Occurrences