Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Macro Expansion Color

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:

Code hover

Macro expansion background cannot be changed:

Macros expansion

like image 371
user3545211 Avatar asked Apr 17 '14 12:04

user3545211


1 Answers

This color can be changed manually.

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

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

  3. Go to eclipse installation directory and go to plugins.

  4. Find org.eclipse.cdt.ui_VERSION.jar.

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

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

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

  8. Copy modified file back to archive and done!

like image 125
alorken Avatar answered Oct 19 '22 19:10

alorken