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.
-
The menus are slightly different for Each Platform. Are you using Mac OSX, Linux, or Windows? – EnabrenTane Jan 15 '11 at 10:55
4 Answers
I've found where to change it:
Preferences -> General -> Editors -> Text Editors -> Annotations and there you have to change both "Occurrences" and "Write occurrences".
-
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
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

- 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
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.

- 173
- 1
- 12
If you're using eclipse with PHP package and want to change highlighted colour then there is slight difference to above answer.
- Right click on highlighted word
- Select 'Preferences'
- 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.

- 1
- 1

- 1,096
- 1
- 12
- 17