37

I just switched from geany to eclipse and I have a little problem

How can I change that highlight color which is VERY annoying

enter image description here

As you can see, whenever I highlight anything and click somewhere else, it changes like this. How can fix this little bug?

Mike Laren
  • 8,028
  • 17
  • 51
  • 70
Mert ÇELEN
  • 493
  • 1
  • 4
  • 5

13 Answers13

26

Open Window>Preferences>General>Editors>Text Editors>Annotations

Modify the color for "PHP elements 'read' occurrences" and "PHP elements 'write' occurrences". Obviously I'm using eclipse PHP but you should see similar options in the annotations list for non-PHP eclipse.

maddRobot
  • 414
  • 1
  • 4
  • 5
  • Change 'Occurrences', 'Write Occurrences', and 'Search Results'. Also, change '(Language) Occurrences', '(Language) Override indicators', '(Language) Write Occurrences'. _e.g.: **C/C++** Occurrences_ – wreckseal Mar 09 '17 at 13:03
  • +1 This answer led me to the correct place for fixing the same issue when using PyDev. The only difference was that I had to change Breakpoints color. – Ubica Sep 09 '20 at 14:37
  • This is the correct answer for my dark themed c/c++ (Vitis IDE) as well – C4F Mar 05 '21 at 19:55
8

Here's what worked for me:

  1. Open Windows -> Preferences -> General -> Editors -> Text Editors -> Annotations
  2. Select "Occurrences (PyDev)." The "Text as" drop down box on the right should read "Highlighted," and the color is very light.
  3. Click the color button and change it to something easier on the eyes.
Aweston
  • 379
  • 2
  • 10
6

I found the best thing to do is to go into GWindows -> Preferences -> General -> Editors -> Text Editors -> Annotations and change everything from Highlighted to Underlined and choose the underline color to suit.

bkepley
  • 71
  • 1
  • 3
4

If you are using Python in eclipse (using PyDev) than the above solution won't help. Than you have to go to
"Open Windows>Preferences>General>Editors>Text Editors> Annotations"

and change the color of Breakpoints(PyDev).
Once you do that the color of all which are matching your current selection will be in the color you chose and not the annoying yellowish highlight color.

H S Rathore
  • 1,954
  • 2
  • 15
  • 20
3

I had to spend an inordinate amount of time searching for an answer to this question. Here is a picture of the Preferences showing which selection is for changing the background color of text you have selected with your mouse in the editor. This is totally different from the Occurrences that people keep pointing out.

enter image description here

John Czukkermann
  • 539
  • 1
  • 4
  • 13
  • Ah, very subtle. This has annoyed me before too. I still don't know why we have to hunt for color settings. These options should be inside the Appearance tab, and changed by the theme. Definitely something Eclipse must improve ASAP. I almost gave up, and I've been an eclipse user for YEARS. – Emilio Mar 08 '21 at 08:27
2

General->Editors->Text Editors->Annotations preference section. Look for C/C++ Occurrences and C/C++ Write Occurrences.

Joannot
  • 29
  • 2
2

If you're using PyDev, use the following:

Open Window>Preferences>General>Editors>Text Editors>Annotations

in the list of Annotation types there is the "Occurrences (PyDev)" Option, which is the one you'll want to change.

location in menu I found a blue highlight for dark mode works well in PyDev.

wiseboar
  • 175
  • 2
  • 13
1

For me, this is what did it (seems it's different for everyone):

Open Windows -> Preferences -> General -> Editors -> Text Editors -> Annotations

Under "Annotation Types":

select "Boot Dynamic Info", then uncheck the "Text as" checkbox on the right.

simbro
  • 3,372
  • 7
  • 34
  • 46
1

Using the answers above to set the colours, here are some that I found worked in RGB:
(65, 66, 36) enter image description here

(83, 55, 55) enter image description here

Joshua Swain
  • 571
  • 2
  • 4
  • 22
0

In my case, Spring Tool Suite 4.14.0 (202203), changing "LSP Read Occurrence" color under Windows -> Editors -> Text Editors -> Annotations solved my problem.

https://i.stack.imgur.com/v74Of.png

burhan
  • 1
0

I had the same issue with highlighted inactive code.

I was able to change it in Window>Preferences>C/C++(or other programming language)>Editor under "Appearance color options:" select "Inactive code highlight" and change to the desired color.

Similar post about inactive code in Eclipse.

mouelle
  • 21
  • 4
0

Also check "Vwrapper Search" color setting if you are using that plugin

Under Open Window > Preferences > General > Editors > Text Editors > Annotations

For some reason it overrides other defaults. Tested with the Darkest Dark theme on Eclipse 2022-09.

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
-1

Annotations is the setting you want to Change (whatever Eclipse you are using - example below is CDT): annotations / Occurences in Eclipse preferences