34

When a method or variable is selected it is highlighted in Eclipse with some color. Can anyone advice where to change that color? I'm working under Windows OS.

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
Eugene
  • 59,186
  • 91
  • 226
  • 333

4 Answers4

65

I've found where to change it:

Preferences -> General -> Editors -> Text Editors -> Annotations and there you have to change both "Occurrences" and "Write occurrences".

NobodyMan
  • 2,381
  • 4
  • 29
  • 35
Eugene
  • 59,186
  • 91
  • 226
  • 333
  • It's good to note that for each language you'll have a different set of "Occurrences" and "Write occurrences". At least in my case with C/C++, Python and Java. – neowinston Feb 27 '14 at 15:32
16

Preferences -> General -> Editors -> Text Editors

Current Line Highlight

I think you want the above

else

Preferences -> Java -> Editor -> Syntax Coloring

Element -> Java -> Method or Variable

Check Enable and select color

EnabrenTane
  • 7,428
  • 2
  • 26
  • 44
  • That's not what I'm looking for. I'm interested in the color which is using to highlight a method or a variable when one of those are selected by means clicking on it. – Eugene Jan 15 '11 at 11:05
2

This has made me mad for about half an hour.

If the issue appears in JavaScript files, the option is under Preferences -> General -> Editors -> Text Editors -> Annotations and in the Annotation types choose JavaScript Occurences. Mine was set to black, nasty little thing took me too long to fix.

enter image description here

Alex A
  • 173
  • 1
  • 12
1

If you're using eclipse with PHP package and want to change highlighted colour then there is slight difference to above answer.

  1. Right click on highlighted word
  2. Select 'Preferences'
  3. Go to General > Editors > Text Editors > Annotations. Now look for "PHP elements 'read' occurrences" and "PHP elements 'write' occurrences". You can select your desired colour there.

Change Highlighted text colour in Eclips with PHP

Community
  • 1
  • 1
Nijesh Hirpara
  • 1,096
  • 1
  • 12
  • 17