I think this one is solved. I got it showing the tooltip with black letters on white background. In my case, it seems that Eclipse is using settings fot tooltips from gtk-2.0/gtkrc
file from theme directory.
My setup: Ubuntu 12.04, Gnome (Not Unitiy), Eclipse Indigo (3.7), GrayDay theme for Gnome. The name of theme and theme itself is not importat.
Open the terminal, change to the theme directory (cd $HOME/.themes) and there, go to the directory of your theme. If your .themes direcotry if empty of it doesn't exist, then, you are using system theme which is in /usr/share/themes. Just figure out the name of the theme you are using (right click on bakcground, choose Change Desktop Background, the theme name should be in the lower right corner. If it says nothing about theme name, then use gnome-tweak-tool to find out which theme you are using).
In the theme directory, issue this command:
grep -r tooltip *
it should list all of the files and lines where keywork "tooltip" is mentioned. Change every background (tooltip_bg_color) to #ffffff and every foreground to #000000. Black latters on white foreground, this is what we want! Especially, change values in the gtk-2.0/gtkrc
file.
Mistake I was doing, is chainging tooltip color in the gtk-3.0 directory, which didn't have any effect.
Now, go to the Eclipse, Window -> Preferences -> Java -> Editor and set Source Hover Background to the "System color" (check on the right). Restart the Eclipse!
This is listig of grep -r tooltip *
from my theme directory after doing changes:
gtk-2.0/gtkrc:gtk-color-scheme = "tooltip_fg_color:#000000\ntooltip_bg_color:#ffffff\nlink_color:#0033ff"
gtk-2.0/gtkrc:style "tooltips" {
gtk-2.0/gtkrc: bg[NORMAL] = @tooltip_bg_color
gtk-2.0/gtkrc: fg[NORMAL] = @tooltip_fg_color
gtk-2.0/gtkrc: GtkWidget::new-tooltip-style = 0
gtk-2.0/gtkrc:# The window of the tooltip is called "gtk-tooltip"
gtk-2.0/gtkrc:widget "gtk-tooltip*" style "tooltips"
gtk-3.0/gtk.css:/* @define-color tooltip_bg_color #343434; */
gtk-3.0/gtk.css:/* @define-color tooltip_fg_color #ffffff; */
gtk-3.0/gtk.css:@define-color tooltip_bg_color #ffffff;
gtk-3.0/gtk.css:@define-color tooltip_fg_color #343434;
gtk-3.0/gtk.css:@define-color theme_tooltip_bg_color @tooltip_bg_color;
gtk-3.0/gtk.css:@define-color theme_tooltip_fg_color @tooltip_fg_color;
gtk-3.0/gtk-widgets.css:.tooltip {
gtk-3.0/gtk-widgets.css: background-color: @theme_tooltip_bg_color;
gtk-3.0/gtk-widgets.css: color: shade(@theme_tooltip_fg_color, 0.90);
gtk-3.0/gtk-widgets.css:.tooltip * {
gtk-3.0/gtk-widgets.css: background-color: @theme_tooltip_bg_color;
gtk-3.0/settings.ini:gtk-color-scheme = "tooltip_fg_color:#343434\ntooltip_bg_color:#ffffff\nlink_color:#4a90d9"
gtk-3.0/settings-default.ini:gtk-color-scheme = "tooltip_fg_color:#343434\ntooltip_bg_color:#ffffff\nlink_color:#4a90d9"