Eclipse in Ubuntu: hover background color property

2019-03-09 01:14发布

问题:

I changed the background color that is visible when hovering code (to black). For example when you hover over a method, you see its signature in a box; I mean the background color of that box.

I want to rechange it but I don't find the property anywhere. Do you know which property it is?

(It should be a global property, because other boxes use the same background color, even the heap status box).

回答1:

It might be too late. But I think you need to change this from your OS.

System->Preference->Appearance->Customise->Colors->Tooltips

solved my problem.

I am using Ubuntu 10.04.



回答2:

Preferences -> Java -> Editor -> "Source hover background"?

Edit: OK, do you mean the tooltip type popup window? The background color of the View to show Javadoc can be set in Preferences "General -> Appearance -> Colrs and Fonts -> Javadoc view background" but if you mean a tooltip type popup then you might have to set this in your OS.



回答3:

In KDE 11.10, System Settings->Application Appearance->Colors(on left)->Colors(tab)->Color Set->Tooltop->Normal Background. Mine was set to black, resulting in black on black in Eclipse.



回答4:

If you want to change the colour of the hover over for a method that indicates you can click through to its declaration:

Preferences > General > Editors > Text Editors

There is a list of options in 'Appearance Color Options' in the right panel. Select the 'Hyperlink' option and change its colour.



回答5:

In ubuntu (software center) find and Install GNOME Color Chooser application and set Tool Tip Background color (yellow). Set foreground color to black if you find color viewing problem on other tooltips.



回答6:

Just go to:

Preferences -> Appearance

and choose a Theme other than GTK



回答7:

There is no setting for this within Eclipse that works for all cases. You will have to set this on an OS level as recommended by several other answers and it will vary depending on your OS and desktop environment.

However, on some versions of Ubuntu (specifically 14.04), none of the methods mentioned in the answers so far work correctly.

In that case, refer to this this answer on AskUbuntu, which lists the files that need to be edited in order to change the tooltip foreground/background colors to black and white OS wide for the built-in themes. In addition to those, I had to edit one more file (gtk-main.css).

The files that need to be edited are:

/usr/share/themes/Ambiance/gtk-3.0/settings.ini
/usr/share/themes/Ambiance/gtk-3.0/gtk.css
/usr/share/themes/Ambiance/gtk-3.0/gtk-main.css
/usr/share/themes/Ambiance/gtk-2.0/gtkrc

Set all instances of tooltip bg colors to #ffffff (white) and tooltip bg colors to #000000 or any other color combination you like. If you use the Radiance (light) theme instead of the default Ambiance theme edit the files in the corresponding Radiance folder.



回答8:

For me, no proposed solution did work. I ended up adding the following to eclipse.ini:

--launcher.GTK_version 2



回答9:

Preferences -> General -> Appearance -> Colors and Fonts -> Java -> Colored labels (or anything in here)