The selected entry in Eclipse content assist is unreadable because of colours - eclipse

In my Eclipse installation, the selected entry in the content assist menu is almost unreadable because the colour is white on white-greyish. See image below.
I can change the background and text colour of the non-selected entries in the list from eclipse preferences, but the selected entry is always the same colour and is always unreadable. I use the Eclipse Color Theme RecognEyes, but that should only affect the editor as far as I understand.
How do I make the text of the selected entry in the context assist menu readable?
Update
After reading m1shk4's answer it does indeed seem that Eclipse takes it's colours from the current gnome theme. However it does this in a kind of weird way.
The background colour of the content assist "window" is the input boxes background colour, and the text colour is the input boxes text colour. This all seems logical.
However the background colour of the selected entry is the windows background colour, but the text of the selected entry is not the background text colour.
See image below for an illustration.
Does anybody know how to fix or workaround this issue?
Working workaround
It seems this issue is rather specific with the default gnome theme in Ubuntu. Switching to another gnome theme solves the issue for me.

Not sure if it's still in time but this might help all of you who are having the same problem, as I had:
Create a file ~/.gtkrc-2.0 and add this content to the file:
style "eclipse_fix"
{
base[ACTIVE] = shade(0.7, "#4283d3")
}
class "GtkTreeView" style "eclipse_fix"
Then just set Unity a new theme (in Configuration > appearance) and set again to the previous theme (Ambiance for instance). That will read the new file created above and the new color will take effect in eclipse.

I'm on Eclipse Neon and using Eclipse Color Themes.
I've solved this issue by:
Window-> Preferences-> General-> Appearance:
->Uncheck "Use mixed fonts and colors for labels."

Windows > Preference > General > Appearance > Color and Fonts
Basic > Content Assist background color, Content Assist foreground color:
and voilĂ !

Update
Interface is in Russian, but I think it's clear that colors, you're looking for, correspond to Selected Items entry. On my screenshot its light-blue for background and black for foreground.

If you are on Ubuntu / Unity, go ahead and install and start gnome-color-chooser.
Global Colors -> Default Configuration, Entry Fields -> selected and change fg and bg colors according to your needs.

I have the same issue on Windows 7. I found that text color(unselected text) of the content assist box can be changed under:
Desktop->Personalize->Window Color->Advanced Appearance Settings->Item->MessageBox
The only problem is one cannot set the background color for the MessageBox. -> any help from someone else?
At least this way you can read something...
NOTE: Be warned that a lot of other applications may depend on the messageBox color!

I was able to fix this in Ubuntu 12.04 by editing a file in the theme (I use Radiance):
sudo vi /usr/share/themes/Radiance/gtk-2.0/gtkrc
At the top is a key "gtk-color-scheme" with a bunch of color variables that are used later in the file. I make these changes: tooltip_fg_color:#000000 selected_fg_color:#000000 tooltip_bg_color:#f5f5b5
After making the changes, change your theme to something else then back, and most everything looks better! I did have to restart eclipse to get the fonts in the borders of the window to update.
Note that unfortunately these changes get overwritten sometimes during updates. There may be a way to use ~/.gtkrc-2.0 to do the same thing, I just don't know anything about that file.

Related

How to edit Javadoc popup link color in Eclipse

I am using the Dark theme in Eclipse Oxygen. When I hover over a class to view the Javadoc, the links are in blue and very hard to see
I have tried editing the hyperlink color in Preferences -> General -> Appearance -> Colors and Fonts -> Basic -> Hyperlink text color but that didn't work. Under the Java section in Colors and Fonts there is an entry to edit Javadoc background and Javadoc text color, but I see nothing for Javadoc hyperlink color or something like that. I could change the background color as a workaround but that breaks the dark theme and I'd rather not.
The short answer is you can't because it's system dependent.
Among the many other ongoing dark-theme bugs that need to be fixed, the particular bug you've found has been recently reported here as bug 517393. The target fix for this bug is in Eclipse Photon (4.8) Milestone 2.
I've figured out a workaround for this issue at least for Windows.
On Windows, Eclipse's html renderer follows Internet Explorer's option for changing color of webpage. So, if you do not use Internet Explorer or just do not mind such change of all webpage, let's go!
Please note that some desciption below may not be accurate since I do not use an English version of Windows.
Open IE, click GEAR icon at top right corner - choose Internet Optioin - click Color at the bottom - uncheck Use Windows Color - change the color of Visited and Unvisited, and the rest two to suit your need if you use dark theme in Eclipse. Apply the change.
Then click Accessibility (on the right of Font) - check Omit Color - Apply the change.
It's done.
For those who are like me still stuck with an older Eclipse IDE like 4.7.3 (without the fix of the bug mentioned in the first answer) and are using Windows:
The workaround in the previous answer does not work if you have Microsoft Edge installed instead of Internet Explorer. Reason: Microsoft Edge does not let you change the link color. There are Chrome Extension that you can install but this didn't work for me either.
Another solution could be to switch Windows to "High contrast mode". Someone even managed to change the link color for Eclipse. I accidently found this "temporary" workaround:
Start Eclipse
Activate Windows "High contrast mode"
Eclipse wants to be restarted. Say yes.
Deactivate Windows "High contrast mode"
Again, Eclipse wants to be restarted. Again, say yes.
Now the Javadoc popup looks like in "Light" theme!? So links are very easy to see now.
However, that's not a really comfortable workaround: it needs some time and you have to repeat these steps after every reboot. My "favorite workaround" for now, is to select the link text in the Javadoc popup with the mouse, so that the link text is displayed with a more readable background/foreground color combination.

How to modify color of inactive line in code assist in Eclipse?

First of all, there is already a similar question, but these answers don't help.
As already mentioned in the topic, I'd like to modify the color of the inactive line in code assist (without changing other areas) because white on light grey background is hardly seen.
"Colors and fonts" just contain "Content assist foreground/background color", this only changes the foreground/background of the whole code assist but not of the active or inactive line. There doesn't seem to be an option for this. Is it possible to change this in a different way, maybe with some kind of stylesheet?
After tinkering around for hours I found the solution. The related GTK class is GTKTreeView, the corresponding widget state is base[ACTIVE]. Unfortunately, a color change will affect other GTKTreeViews in Eclipse too (e.g. the tree view in project explorer, but for me it doesn't matter). I've set the background color of the list items to hex #AAAAAA so their look is a little bit darker now. I saved these settings als .gtkrc-eclipse in my home dir:
style "eclipse" {
font_name = "Sans Condensed 8"
}
style "listitem" {
base[ACTIVE] = "#AAAAAA"
}
class "GtkWidget" style "eclipse"
class "GtkTreeView" style "listitem"
..and the command of my Eclipse launcher looks like this:
env GTK2_RC_FILES=/usr/share/themes/Ambiance/gtk-2.0/gtkrc:/home/myuser/.gtkrc-eclipse '/opt/eclipse/eclipse'
I'd say it's system-dependent. Try playing with system default colors on Preferences > Appearance > Customize > Colors. Depending on your Ubuntu theme the font could be unreadable sometimes.

Change annotation background colors in eclipse?

So in eclipse whenever there is an error it's underlined in red, and when you hover over it is displays an annotation with tips on how to fix the error. On my Windows OS it is correct and the background is a tanish color but on Ubuntu the background is black and I want it tanish like Windows. I know there is an annotation area under Preferences > General > Editors > Text Editors > Annotations, but I don't see a section to change background colors. Please help.
Oddly, colors and fonts are very poorly implemented in Eclipse. Quite a number of things are either extremely difficult to figure out or impossible. Looks like this one is impossible to modify. Perhaps there's an OS way to make those changes?
That said, I found an Eclipse plugin, Annotions Ruler Background. It looks like it should do the trick, but was designed for Indigo (3.7) and doesn't seem to work on Juno (4.2). Sigh.
You can install it from the usual way in Eclipse (help->eclipse marketplace->search, etc.). Their website is here.
If you're still on Indigo, give it a try.
I find this page, it works. http://ubuntu-user-tricks.blogspot.tw/2012/09/3-things-to-do-after-installing-eclipse.html
It change the theme tooltip background color, and foreground color if need.
You can install tool gnome-color-chooser or modify the configure directly (default at /usr/share/themes/Ambiance/gtk-2.0/gtkrc). If After you modify the theme configure, you need reload theme to use new config.

Eclipse's Package explorer background color follows windows theme. I want to change the color without changing windows' theme. Possible?

Maybe a way to alter the colors locally (as in application dependant)?
A background color of eclipse is white, the same white of windows' active window background color. If I change the color on the theme, eclipse changes to the color.
I want to change this software's color without changing the whole theme (because then every program gets weird colors). Is this possible? I thought that maybe there was a way to apply different windows themes to different programs, or something.
I'm using windows XP, classic windows theme.
Install the "Eclipse 4 Chrome Theme" from
http://marketplace.eclipse.org/content/eclipse-4-chrome-theme
Then you can customize a lot of the Eclipse UI widgets.
But not what you want, at least not out of the box.
For that you should go to the CSS tab (in Eclipse 4 Chrome Theme) and paste this:
Tree, List, Table {
background-color: #202020;
color: #d0d0d0;
}
You can change almost anything, the problem is finding out what, and the fact that some things are bitmaps that you can't change (so if the bitmap is dark and you set a dark background you will "loose" the bitmap)
This list of widgets might help, http://download.eclipse.org/rt/rap/doc/1.5/help/html/reference/theming/index.html but they give you generic info on the widget names, not the Eclipse info (with IDs and all), so be careful :-)
== Very late addition ==
Everything you need in one place, including links to a custom dark theme: http://mihai-nita.net/2013/09/19/dark-eclipse/
Mac Screen Shot Example as of Sept 2013 (please be sure to restart Eclipse after changing file):
Just search "Theme" in the Eclipse Market Place. Install Moonrise. (Should be first option). Then go to the General, appearance, Click on appearance, change theme to moonrise, Then there you go.
Knowing the way the workbench is built, I'm sure your request is not possible on the Eclipse side. You can do this for the editors, because they are StyledText widgets, and you are exposed some preferences to customize these.
The other views are various widgets, some are Trees, some are Text, some are composed from various other widgets. All of them are created with the default constructor which just uses the Windows theme.
I don't know of a way to change every Eclipse window to your color scheme, but I can get you at least as far as changing some of the editing windows...
Open up "Window -> Preferences", then under "General | Editors | Text Editors" you will find a section that will allow you to set the "Appearance color options", Background color is one of those options.
PS: I'm using Eclipse 3.6 (Helios)
Sadly, this is not possible (which is crazy).
However, Aptana Studio (which is an Eclipse derivative) lets you theme the entire IDE.
I did some research and found that actualy it is posible to change all colors, but abit harder.
there are two methods that I found so far.
first since eclipse is using OS themes, you can change your OS background settings, like folder background etc., or just change the whole theme if your using windows, but the downside is that all windowses will be same color, in linux and mac os it is also posible, but in different way, I did read it somewhere, but can't remember where :)
second creating a specific theme for eclipse, for example http://rogerdudler.github.io/eclipse-ui-themes/ or any other theme like google chrome etc.
Install the theme from here as per the instruction in the github:
https:// github.com/guari/eclipse-ui-theme
If you don't like the editor color theme, there are bunch of 'em here
http://eclipsecolorthemes.org/
Combination of both just works like charm for me!

How do I change the background color of the column with the expanders in Eclipse?

Recently after scorching my retinas from the garish white background in Eclipse, I found some of the excellent posts about how to change the colors so it uses sane (i.e. dark background) colors in the editor. However, one problem present in all solutions is that background of the column with the expanders for code folding is always white. Is there a way to change the background of that column?
I'm not the only person that has this problem, as shown in the screenshots for the following questions:
Dark Color Scheme for Eclipse
Color Themes for Eclipse (application of color schemes results in this issue on a Mac, no idea about PC)
I know that the problem is not language specific as it happens in Java, Python, HTML, and everything else. Any hints on where in the pages of preferences this setting is?
This is related to Eclipse Bug 62712 which is fixed in build 20090329-2000 almost a year ago. In my Galileo of build 20090920-1017 it just works when I change the background color through General > Editors > Text Editors. Here's a screen (don't pay attention to the ugly color combo, my bg defaults to white and I just picked random yellow to demonstrate that the ruler background get changed as well):
In other words, just upgrade your Eclipse to include this bugfix. Did you check Help > Check for Updates?