user1129812
user1129812

Reputation: 2889

eclipse cdt - how to set the background color of the tooltips window in C/C++ editor window?

I have the same problem as that described in this post

I am using Eclipse 3.5.2 with CDT and have not installed this Color Theme Plugin. When I am editing C/C++ source files and placing the cursor over a defined method, the generated tooltip window shows a "black" background color so that I could not clearly see the text inside the tooltip window. I have tried to change settings in "C/C++/Editor/Syntax Coloring" preference but I have not found setting of background color for tooltip window.

The above post suggested that I may have to re-install the whole eclipse but this solution seems would cause many troubles to me. Does anyone know an easier solution for this apparently small problem.

Thanks for any suggestion.

Upvotes: 1

Views: 4565

Answers (3)

Oliv
Oliv

Reputation: 10822

Change this color in the Eclipse preferences (Window/Prefernces menu). Good color is rgb=255,255,225 (this is default for Java), or choose your own.

enter image description here

Credits to assifm.

Upvotes: 7

assifm
assifm

Reputation: 91

The default UI prefs in CDT seems to be missing the "sourceHoverBackgroundColor" setting.

To fix this add a line like the following:

sourceHoverBackgroundColor=255,255,255

to the file

[workspace]/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.ui.prefs

(be sure to back-up the file before you make changes to it!)

you'll need to get eclipse to re-read that file by restarting eclipse.

Upvotes: 9

iammilind
iammilind

Reputation: 70098

Full re-installation of eclipse may not be needed. However, it's worth cleaning up the workspace / project related settings. You can follow below steps:

  1. Go to the workspace folder and remove .metadata
  2. Go to the projects whichever you created under this workspace and remove, .cproject and .project
  3. Now, start the eclipse from the scratch, you will see that all your color combination you set are gone ... it's ok
  4. Install the color themes plugin; don't be afraid of it, it's really cool (it doesn't cause such issues for me);
  5. Download a proper color theme preference file .epf (here is mine)
  6. Store this .epf file inside your workspace directory; so that you know that this color theme is for this workspace; though you can store this anywhere
  7. Go to File -> Import -> General -> Preferences and select this .epf file and install.
  8. You will get the desired black background and grey text and the auto-complete options would be unaffected

You can also think of installing the full screen plugin for eclipse, for better visibility.

Upvotes: 0

Related Questions