Search code examples
eclipseeclipse-cdtcolor-scheme

How to change highlight color of references in Search View in Eclipse CDT?


I want to change the highlight color of references showing in Eclipse's Search View after CDT find reference operation (right click on code -> References -> any). How can I do this?

Note: this is different from standard match highlight color.

Illustration: enter image description here


Solution

  • I found out two easy solutions to this problem:

    1) Create a new file and add those lines (extension of the file needs to be .epf):

    file_export_version=3.0
    /instance/org.eclipse.ui.workbench/org.eclipse.cdt.ui.ColoredLabels.match_highlight=128,0,128 
    

    You might change the color value to match your theme

    Then go to File -> Import -> General -> Preferences

    Browse to the newly created file and click the Finish button

    2) Go to [workspace-location]/.metadata/.plugins/org.eclipse.core.runtime/.settings

    Edit org.eclipse.ui.workbench.prefs file and add the line

    org.eclipse.cdt.ui.ColoredLabels.match_highlight=128,0,128