15

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

Steve Lorimer
  • 27,059
  • 17
  • 118
  • 213
user3545211
  • 161
  • 2
  • 6
  • I can't find any settings anywhere – Steve Lorimer Jun 13 '14 at 04:34
  • 1
    Have you found a solution for this? I'm facing the same problem. The macro expansion window is barely legible because I haven't found a way of changing the color. – m4l490n Mar 14 '16 at 15:30
  • any word on how to do this? I have the same issue – bjackfly Jun 13 '16 at 17:20
  • @bjackfly, m4l490n. Though it's not a solution, but a quick workaround. Once you reach in the above situation where the background is too light compared to foreground, click on the "Fully Expanded" section and press "Ctrl + A" (i.e. select All). This will be little easy on eyes. For now, it seems that there is no solution for this issue. – iammilind Jan 02 '17 at 11:16
  • running neon 4.6.2 dark now and still don't see a solution for this. Any thoughts? – bjackfly Mar 13 '17 at 15:12
  • 4 years later I still haven't found a solution for this. – m4l490n Mar 07 '20 at 18:40

2 Answers2

4

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!

Community
  • 1
  • 1
alorken
  • 41
  • 2
  • Can't find the sequence 11 00 D4 11 00 D4 11 00 D4 – rh0x May 22 '17 at 09:41
  • Can confirm this worked for me on Ubuntu 16.04 Eclipse Version: Neon.3 Release (4.6.3) Build id: 20170314-1500 – xerous May 22 '17 at 20:00
  • How do you copy back the file to the .jar? I can extract it but it doesn't have the "paste" option. I also tried with the information here https://docs.oracle.com/javase/tutorial/deployment/jar/update.html but nothing happened. – m4l490n Jul 17 '19 at 15:52
0

The highlight colours match your theme, so it may be that changing the hover background colour will help the clarity of the text.

  • Navigate through the menus:

Window, Preferences, C/C++, Editor, Appearance color options.

  • "Source hover background" is at the bottom of that list.
  • Disable 'System Default' to change the colour, or enable it to try the system default colour.

The source for my answer was here: Eclipse, change popup text background color when hovering the mouse on a keyword

Community
  • 1
  • 1
shrapx
  • 11