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.
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.
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
org.eclipse.cdt.ui.ColoredLabels.writeaccess_highlight
in the same way for the beige write access highlights. –
Fundus It seems that these colours are not editable and are therefore hard coded in a way that (clearly!) does not work well with a dark theme.
This is the relevant part from the org.eclipse.cdt.ui/plugin.xml:
<colorDefinition
id="org.eclipse.cdt.ui.ColoredLabels.match_highlight"
isEditable="false"
label="%Dummy.label"
value="206, 204, 247">
</colorDefinition>
A small change to the plugin.xml allows the colour to be editable:
<colorDefinition
categoryId="org.eclipse.cdt.ui.presentation"
id="org.eclipse.cdt.ui.ColoredLabels.match_highlight"
isEditable="true"
label="Match Highlight"
value="206, 204, 247">
</colorDefinition>
And then you can edit the background colour and fix your problem.
This is a known issue in CDT (Bug 468206), contributions welcome.
plugin.xml
from the jar and repack it, not working neither :( –
Acerbic Found a workaround that works for me. With eclipse closed:
<eclipse installation folder>\plugins\org.eclipse.cdt.ui_6.3.0.201802261533.jar
plugin.xml
and change the color to your taste<eclipse installation folder>\configuration\org.eclipse.core.runtime\.mainData.1
© 2022 - 2024 — McMap. All rights reserved.