Eclipse 2019 black background - eclipse

After install of 2019-12 version of Eclipse I can't set black background while using Dark theme and Default set of colors.
If I change color in General -> Editors -> Text Editors -> Appearance color options -> Background color - I see line numbers background color get changed to my choice, while text area remain in same dark grey, regardless of the color I choose.
I tried to manually edit epf preferences and import them back, but even this way doesn't work.
Is there a some change/bug in Eclipse 2019-12 which override the user chose?
There are some already answered questions about Eclipse colors, but I believe they are not helpful after recent changes.

For those who come here by googling, you can change the color of Java editor, Package Explorer and Outline views background in one place, see file
<..>.p2\pool\plugins\org.eclipse.ui.themes_<version>\css\dark\e4-dark_partstyle.css
and then edit background-color
.MPart DependenciesComposite > SashForm > Section > * { /* Section > DependenciesComposite$... */
background-color: #151515;
color: #AAAAAA;
}
I found #151515 better than default one.

There seems to be a recent Eclipse bug with possibly a duplicate.
There is a possibly duplicate question here which has at least one additional suggested workaround besides the other answer to this question.

Related

Eclipse Kepler change tree selection color or background CSS

In Eclipse Kepler on Linux Mint, selecting items from a tree-view like the Project window is pretty straightforward:
But on the Searches window, matches and potential matches have no background color when you select them. Hence, they become invisible:
How to I change the color of selected text there? I'm guessing it defaults to a system color, but for most other colors you can override that.
In Eclipse Juno this was not a problem, because the selection background color was, like in the Project Window, the same as the system default:
I think that in Kepler the system default background is not working in the Searches window because they forgot to implement it after manually allowing the contents of the tree view to have a different color from the system color specifically for potential matches:
Unfortunately, they didn't add options to change the definite matches and the selected matches color here, otherwise I would probably have figured this out myself. ;)
edit I figured out how to change the background-color of the entire Tree:
Tree {
background-color: #f00;
color: inherit;
background-image: none;
}
But I cannot change for the life of me the color or background of single items. At all. In the end, I'd like to change the background for the selected item so it becomes readable.
Just trying a bunch of stuff, but not working:
.TreeItem:even,
.TreeItem:linesvisible,
.TreeItem:selected,
.TreeItem:unfocused,
.Tree-RowOverlay,
.Tree-Cell,
.Tree-GridLine,
.Tree-Indent {
background-color: #0f0;
color: #f00;
}
Note - In the Kepler screenshots I use the Jeeeyul's Eclipse Themes plugin to change some of the hideous unbelievably terrible design decisions the Eclipse team made for Kepler, but this is unrelated. The font, the colors and the problem of the selections are the same with or without the plugin.

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.

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

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.

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?

Changing UI color in Eclipse

I'm aware of color themes for Eclipse: I've used it to change most of the editor colors, and that's great.
But that wasn't enough, there's still too much white. How to change it? (It hurts my eyes.)
I've searched in the preferences (both using Eclipse itself and editing the files) for instances of white (255,255,255) and changed them all. Looks like I'm missing something.
Each time you see white or gray color, this is more than likely related to OS system colors.
In other word, to truly have an Eclipse full dark theme, you need first to have a dark theme for your OS, and then your Eclipse will follow.
Here is an example on a Windows7, modifying just one parameter:
alt text http://img92.imageshack.us/img92/5053/eclipsered.png
Probably not the answer you're looking for, but the IntelliJ community edition is an excellent free IDE and is very easy to use. The background colours can be set and changed to many colours. There are also a number of free plugins which can customize backgrounds and the look and feel. Well worth a look if you don't find exactly what you're looking for with Eclipse.
I see you're on the Mac - the easiest thing to do would go to System Preferences -> Accessibility -> Seeing -> Display -> "White on Black". It will invert everything on your screen though, I don't know, if you'd like that?
YES, THERE IS A WAY TO DO IT
You will need to configure 3 things in order to get your dark UI.
1) Java Editor Colors
This is the source code edition area. You can use http://eclipsecolorthemes.org/ for the editor part, though those colors can be manually edited by default.
2) Eclipse UI
The UI colors can be edited with the addin Chrome Theme which can be found in the eclipse market place or in the following link https://github.com/jeeeyul/eclipse-themes/. If you want a dark theme just edit away until you find the colors that suit you.
3) Final touches
After doing the previous steps, some colors will still match the OS colors. To darken what's left, just get the pre-baked Dark Juno theme from https://github.com/eclipse-color-theme/eclipse-ui-themes. Download the zip file and unzip it into your dropins folder (which is located in your eclipse folder). If the dropins folder doesn't exist, just create it.
Restart eclipse and you are set.
You can try these steps:
Find the path: ~/.p2/pool/plugins/org.eclipse.ui.themes_*.*.****.v********-****/css/e4_basestyle.css;
Use a text editor (example: Sublime Text 3) to open e4_basestyle.css if you used default theme config;
Append this code and save
#org-eclipse-jdt-ui-PackageExplorer Tree,
#org-eclipse-ui-navigator-ProjectExplorer Tree {
font-size: 10px;
font-family: "DejaVu Sans Mono for Powerline";
background-color: RGB(223,238,223);
},
#org-eclipse-ui-views-ContentOutline Tree,
#PerspectiveSwitcher ToolBar {
font-size: 10px;
font-family: "DejaVu Sans Mono for Powerline";
background-color: RGB(223,238,223);
}
Restart Eclipse. It is like this: result