简体   繁体   中英

Where to change highlight color for selected occurrences in Eclipse?

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.

I've found where to change it:

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

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

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.

使用PHP更改Eclips中突出显示的文本颜色

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.

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM