12

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.

Павел
  • 677
  • 6
  • 21
  • 1
    You will probably have to edit the CSS in the org.eclipse.ui.themes plugin to do this. But a pure black background will look very harsh. – greg-449 Jan 05 '20 at 11:19
  • for my glossy screen I believe black is better. at least I used to it, thanks for advice, I will try – Павел Jan 05 '20 at 11:56
  • @greg-449, so I found the place. You were right pure black is that we called "tear out your eye" in Russian. But something like #151515 is quite better compared to default #2f2f2f from my point of view. – Павел Jan 06 '20 at 08:06

2 Answers2

13

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.

Павел
  • 677
  • 6
  • 21
  • 3
    Thanks! This was very helpful! FYI, on my Windows system there was no .p2 directory or pool subdirectory, and the file was actually \plugins\org.eclipse.ui.themes_1.2.900.v20200106-1021\css\dark\e4-dark_partstyle.css. – Some Guy Apr 03 '20 at 09:47
  • Great answers. It does help to get the background darker. But I was happy for a bit, then not sure why but looked like eclipse was behaving pretty weird. Could be totally unrelated. –  May 30 '20 at 01:22
  • 1
    Confirmed on Linux with Eclipse 2020-03 (4.15.0) Path is `plugins/org.eclipse.ui.themes_1.2.900.v20200106-1021/css/dark/e4-dark_partstyle.css` – ste Jun 04 '20 at 13:37
  • @ste In my plugins/org.eclipse.ui.themes_/css, there is only files like e4_basestyle.css. I am not sure if "Sdk/tools/lib/monitor-x86/plugins", which I found it in is even the right folder. Thanks for helping! – lue Oct 05 '20 at 14:18
  • Confirmed again on Linux with Eclipse 2020-09 (4.17.0) Build id: 20200910-1200. Path is now `plugins/org.eclipse.ui.themes_1.2.1100.v20200825-0757/css/dark/e4-dark_partstyle.css` – ste Nov 03 '20 at 20:22
  • I found it in linux under /snap/eclipse/48/plugins/org.eclipse.ui.themes_1.2.800.v20191127-13 but i can not change it. says "read only file system" any suggestions? – Petr Nov 24 '20 at 14:18
  • **Improvment** : As mentioned here : https://bugs.eclipse.org/bugs/show_bug.cgi?id=558782 , it seems it comes from some lines ... ; so, for those that want to modify the text editor background ONLY, simply add this : `#org-eclipse-e4-ui-compatibility-editor Composite > * > * { background-color: #000000; }` – Valery S. Feb 01 '21 at 17:04
0

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.

Some Guy
  • 405
  • 8
  • 15
  • 1
    Also described by Eclipse Bug [559321](https://bugs.eclipse.org/bugs/show_bug.cgi?id=559321) – ste Jun 04 '20 at 13:25