Eclipse: How do you change the highlight color of the currently selected method/expression?

Viewed 115716

In eclipse, when your cursor is placed on a method (or other things), other places the method exists are highlighted. I'd like to change the color of this highlight, but after scouring the eclipse preferences many times in all 3 places, I have yet to find it.

Any of you Eclipse gurus know where to find this option?

6 Answers
  1. right click the highlight whose color you want to change

  2. select "Preference"

  3. ->General->Editors->Text Editors->Annotations->Occurrences->Text as Hightlited->color.

  4. Select "Preference ->java->Editor->Restore Defaults

in my case (Eclipse IDE 2021-06), dark theme, the issue was with the background color of "C/C++ Write Occurrences".

On each click over a variable being written in the code, the editor highlights all occurrences of that variable.

You can find this setting here:

General -> Editors -> Text Editors -> Annotations and then select 'C/C++ Write Occurrences'. And finally change che Color property.

Related