views:

340

answers:

2

When you have "Mark occurences" enabled in Eclipse, placing the cursor on any type/variable/method/etc will highlight all occurences in the text editor and place a faint bar in the right ruler to show you the location of other occurences in the file.

Does anyone know where in the Preferences you can change what color is used to highlight the other occurences in the side ruler? The color is way too faint for me with my current monitor/Windows Aero theme.

I tried to go into Preferenecs > General > Appearance > Color and Fonts change the color for "Color labels - match highlight" but this didn't seem to apply.

Here is a screenshot with what I am talking about:

Eclipse screenshot

+1  A: 

The color in the bar is the same as the color the text is highlighted with in the editor. It is set by going to

Preferences > General > Editors > Text Editors > Annotations

and changing the Occurrences and Write Occurrences colors.

ColinD
thanks, I was looking at this window earlier and must have missed the Color icon.
matt b
a little annoying that you can't have separate colors for text and the sidebar, but oh well
matt b
Well, if they weren't the same, then it would be a lot less obvious what the color on the right corresponded to in the code. It probably didn't even occur to the eclipse guys to let them be different.
Jonathan M Davis
+2  A: 

Right click on the marker and select the only menu item "preferences", this opens the preferences dialog: General/Editors/text Editor/Annotation.

  • The color of "occurances" is used for the matching items,

  • "write occurances" for item selected by you.

The updates do not apply immediatly after using the Apply button, only after closing with OK and eventually reselect.

stacker