39

I downloaded Eclipse Luna 4.4 from eclipse.org. And I changed the theme on general > appearance > theme => dark. But it's not like I want.

Which is now enter image description here

Should be (appears in the pictures) enter image description here

Moonrise ui enter image description here

How can i do completely dark Eclipse?

greg-449
  • 109,219
  • 232
  • 102
  • 145
erginduran
  • 1,678
  • 5
  • 28
  • 51
  • 7
    were you able to get scrollbars as shown in the images ? Even after installing themes I am seeing them white like the default style – Anirudha Agashe Jul 04 '14 at 06:55
  • 1
    @AnirudhaAgashe , the scrollbars seem to be controlled by the OS (are you like me on Windows Classic theme?) https://bugs.eclipse.org/bugs/show_bug.cgi?id=430278 – targumon Sep 04 '14 at 12:25
  • 1
    If you're on Ubuntu, you can fix the scrollbars by setting the environment variable LIBOVERLAY_SCROLLBAR=1. – Neil Traft Feb 18 '15 at 03:14
  • @NeilTraft How do you do that? – Cristian Gutu Mar 04 '15 at 20:46
  • 3
    If you already have a [.desktop file](http://askubuntu.com/a/145018/10800) for Eclipse you can have a line like `Exec=env LIBOVERLAY_SCROLLBAR=1 eclipse`. If you normally run Eclipse from the terminal then you can just set that variable before you run it. – Neil Traft Mar 06 '15 at 00:04

6 Answers6

30

The editor should work out of the box, we (the Eclipse platform team) fixed that before the Luna release, at least for JDT and CDT. I think what you are seeing is the "Terminal" bug, i.g., if you include the new terminal (or download a version of Luna which includes that you get this white background). This is already fixed and should be contained in the 4.4.1 release.

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=438175 for details on the bug.

vogella
  • 24,574
  • 4
  • 29
  • 26
  • Do you know if how the dark theme affects the workspace in general was tested on Windows prior to the Luna release. For me, if I download the "Eclipse IDE for Java Developers" and run it on Windows 8.1, change the theme to dark and restart Eclipse it looks like [this](http://i.imgur.com/FflZltM.png). Main things I can see are some of the icons looking a bit weird, the scrollbars for the editor being white and the Mylyn window looks a mess. I'm just wondering if I'm doing something wrong here or is this how you would expect it to look on Windows? – Barrie Aug 02 '14 at 10:08
  • 9
    FFor me it did not work out of the box. The toolbars are dark, the background of project explorer is dark, but lines, buttons, etc are showing with original colors. The Java code background is white, mylyn is a mess too.. I was very excited when I heard about this feature, but this was a total let down. I hope next SR will get this right as it has long be awaited for. – Edy Bourne Aug 10 '14 at 22:40
  • How do I know if I "downloaded a version of Luna which includes the new terminal"? I downloaded CDT suite and I got this bug directly. So that means I have to manually go through this terminal file I guess? – xji Aug 13 '14 at 13:52
  • vogella, I am running the 32-bit version of this in Linux Mint and I applied the fix to the terminal widget as outlined in the bug report, but it does not address the scrollbar color (like the color behind the buttons). The scrollbar remains unthemed even after applying the dark theme (though the editor is now fixed and displays properly). – Jack Aug 19 '14 at 15:26
  • 2
    [Toshihiro's workaround](https://bugs.eclipse.org/bugs/show_bug.cgi?id=438175#c6) works for me. So you don't have to go around and twiddle with the settings and change all the defaults, do the workaround and save yourself the hassle. – Jeff Mercado Nov 19 '14 at 19:30
  • 3
    I just downloaded Luna now and switched to dark theme and this is still happening. Themes never look right in Eclipse. period. What is an Eclipse version taht includes Terminal? How are we supposed to know what this means? – Stealth Rabbi Jan 13 '15 at 20:11
  • 1
    Luna Service Release 1a (4.4.1) still looks like crap when applying the dark theme. – Stealth Rabbi Jan 13 '15 at 20:38
  • 1
    @StealthRabbi I have still been getting bugs as well when applying the dark theme out of the box. – Ellery Jan 29 '15 at 14:35
  • 1
    Have you seen the JS editor? Can't imagine that's the "Terminal bug" – Marc Feb 09 '15 at 11:14
  • My 2 cents, I'm on 4.4.2 and win8. Sometimes setting a theme takes effect, sometimes it doesnt fully. Sometimes I get further changes when restarting. I downloaded some themes from http://eclipsecolorthemes.org/, found one I liked but I can't switch back. When I do, it looks different to the first time I applied it! – TedTrippin Apr 30 '15 at 10:32
  • it gets even worse than this... (Luna SR2 (4.4.2), Build id: 20150219-0600) I'm using CDT and when I run the build, the CDT build console has a clear background and I can read the text (black or whatever) when you do double-click on the error line, it all goes dark grey, and the error messages and what have you are unreadable. Changing the settings for the console works, until you double-click and it goes back to black-on-dark-grey. What a joke. Honestly, I can't believe no one noticed this when testing? – Marco Massenzio May 03 '15 at 22:17
10

Ok here's what worked for me, simpler than installing a whole new colour theme. (on java 8 JRE on WinXP)

Preferences -> General -> Editors -> Text Editors: Background colour

deselect 'system default' and choose pure black

Now go to 'current line highlight' and make it you favourite shade of grey. RGB 60/60/60 works for me.

dan carter
  • 4,158
  • 1
  • 33
  • 34
  • This made things worse for me, if you can believe that. The background turned white instead of black. Just noting for other Ubuntu 14.04 users with Eclipse CDT 4.4.2 – CivFan Aug 11 '16 at 19:01
7

You have changed the UI but the not the colors of your editor. Check out http://eclipsecolorthemes.org/ and install the color theme of your choice.

Ellery
  • 1,356
  • 1
  • 14
  • 22
  • 11
    Installing color themes is not changing the scrollbar theme\ – Anirudha Agashe Jul 04 '14 at 06:56
  • 20
    Hard to believe that this is the correct answer as the functionality was promoted as top EclipseLuna (standalone) feature - [Dark Theme, Top Eclipse Luna Feature #5](http://eclipsesource.com/blogs/2014/06/20/dark-theme-top-eclipse-luna-feature-5/) – FrVaBe Jul 10 '14 at 13:47
  • See my answer, I think this is a bug in the terminal view, which is already fixed and should roll out soon. – vogella Jul 23 '14 at 05:18
  • @vogella I see what you are saying I agree with you. Do you think I Should leave this answer up for people still using versions before 4.4.1 as a fix? – Ellery Jul 24 '14 at 21:41
  • Thats good and all, but when doing the steps mentioned here (set the built-in Dark theme and set a color theme for the editor) the text editor for example SQL-files looks horrible. I managed however to set the SQL syntax coloring just fine in the settings, but how can I set the normal text to be of lighter color. I tried unchecking the system default and set new foreground color for text editor in the Preferences to no avail. Also the SQL syntax coloring doesn't have option for the normal text. Everything else is neat in the new color theme. Black text is bad with dark background. – Steve Waters Dec 02 '14 at 14:40
  • 3
    does not solve the problem on mac os x (even with 4.5.0) – Macilias Jul 07 '15 at 12:39
  • 1
    This is not the correct answer at all. Does not work on Unix and MAC for me either... – Andry Aug 25 '16 at 09:29
4

The correct thing to do in Ubuntu is to set LIBOVERLAY_SCROLLBAR=1 . My entire /usr/share/applications/eclipse.desktop file:

[Desktop Entry]
Name=Eclipse
Type=Application
Exec=env LIBOVERLAY_SCROLLBAR=1 /opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=Eclipse

The important part here is the env LIBOVERLAY_SCROLLBAR=1 which tells Ubuntu that it's alright to use the pretty orange bars. Also note that my eclipse install location is /opt/eclipse/eclipse; it may be different for you depending on how you installed. Use the path from your existing .desktop file.

Daniel Centore
  • 3,220
  • 1
  • 18
  • 39
1

I tried many SO answers related to Dark Theme in Eclipse on my Debian Stable(Jessie)\Gnome shell box, but none worked well. The key thing that helped in my case was setting SWT3_GTK=1 and running eclipse executable from shell script. I.e. create a script like this in the same dir where eclipse executable resides:

#!/bin/sh
export SWT_GTK3=1
./eclipse

You should also install Eclipse color theme in order to choose Dark theme. "Dark" or "Moonrise" themes work well for me. In addition to that install gnome-tweak-tool and switch on Global dark theme. You may also want to install Adwaita theme.

Restart Gnome shell and Eclipse to make sure your settings are applied.

plain_text
  • 91
  • 5
0

I tried several of the answers listed here and still had a white background in several views like package explorer, outline, and problems. The solution for me was to change to a dark theme on my OS (fedora 18) rather than changing my UI theme or editor preferences.

JohnFullard
  • 177
  • 5