Eclipse Macro Expansion Color

eclipse, eclipse-cdt, eclipse-plugin

Solution

This color can be changed manually.

Go to Eclipse Installation Details `->` Plugins tab.

Find plugin `org.eclipse.cdt.ui` and remember this version.

Go to eclipse installation directory and go to plugins.

Find `org.eclipse.cdt.ui_VERSION.jar`.

Open this file as archive and extract `"org\eclipse\cdt\internal\ui\text\c\hover\CMacroCompareViewer.class"`.

Open file `CMacroCompareViewer.class` in any hex-editor.

Find sequence `11 00 D4 11 00 D4 11 00 D4`

This bytecode pushes values `{212,212,212}` to stack before call RGB constructor. Single instruction `11 00 D4` means `sipush D4`. We need to change this color to more darker like `{32,32,32}`. So we replace value `D4(212)` to value `20(32)`, and sequence must be `"11 00 20 11 00 20 11 00 20"`

Copy modified file back to archive and done!

Problem

Is there anyone who knows how to change the highlight color in the Macro Expansion popup in Eclipse CDT? The color is light grey, and it appears in Original and Fully Expanded view for those matches items. I didn't find it in any preferences option :( Code hover background can be changed: Macro expansion background cannot be changed:

Original source

Related problems