Eclipse Color Theme

About half a year ago, I began to work on what has become my most popular open source project up until now: Eclipse Color Theme, a plugin that makes it possible to use colour themes in Eclipse. I thought this was a good time to talk a bit about the history and future of the project.

The black on white ages

It all started with me being fed up with Eclipse not supporting colour themes in any reasonable way. Since Eclipse was mandatory at my old job, I was forced to stare at it all day. I don’t like to stare at black on white text all day, so I had to find a way to use colour themes.

Before I continue, you need to know that Eclipse preferences are a mess. A complete and utter mess. Every plugin can store arbitrary key value pairs of data, and there is no way to export or import preferences selectively, it’s all or nothing.

There are no central colour settings, so every plugin stores their own, in the format of their choice. In practice, this means that even if you actually change all the colours for the Java editor manually, you will have to do it again for the JavaScript editor. And the XML editor, and the JavaScript editor, and whatever other editor you want to use. This is highly inconvenient.

And because Eclipse preferences are such a mess, all you can do to share a colour theme you created is to export your preferences and have someone else import them. And since your preferences contain all your Eclipse settings, it will completely mess up the other person’s settings. Bah.

So I guess it’s safe to say that using colour themes in Eclipse without going insane was impossible. The only solution I saw was to create a plugin that would take care of changing each editor’s preferences according to a standarised colour theme format, without messing any other settings up.

I created a prototype that supported just the Java editor and a single hard coded colour theme to see if this would work. It did, so I added another colour theme and published version 0.1 of Eclipse Color Theme on the Eclipse Marketplace.

The colour themes revolution

I never thought that many people would be interested in having colour themes for Eclipse. Probably just a small bunch of geeks like me, coming from Vim and Emacs. Searching the Internet for Eclipse colour themes revealed just a handful of people sharing their exported preferences or asking about theme support, but it were really few. There was even an ancient ticket about colour theme support in Eclipse’s bug tracker, for which about 4 people voted during all that time. So I thought I’d create the plugin more or less for myself.

Turns out I was wrong, I received many emails of appreciation, even a couple of donations. So I was quite motivated to improve the plugin and add support for more editors, at first XML, HTML, JavaScript, CSS and C++. At that time, my own needs where met, but I kept adding things that were requested via email or GitHub.

At some point, Roger Dudler contacted me and told me that he was planning to create a website where people could create colour themes for Eclipse, and whether I wanted to join forces. I did, so we both worked on plugin and website together (well, I did only a few things on the website so far), and eclipsecolorthemes.org was born, allowing users to create their own colour themes with a WYSIWYG editor.

Did I tell you how wrong I was about nobody being interested in colour themes for Eclipse? I was. Within a few weeks, Eclipse Color Themes climbed to the top 4 of Eclipse Marketplace with thousands of installations, and hundreds of themes on eclipsecolorthemes.org.

This huge demand created a constant flood of emails, asking us to support new editors or reporting problems. We decided to make the plugin more modular and easier extendable, using Eclipse plugin features like extension points. Roger, who had some experience with Eclipse RCP development, did that conversion mostly by himself.

Future

Maintaining the plugin is not too much work, so Roger and I are able to concentrate on other projects. Our own needs are long met, especially since I don’t use Eclipse on a daily basis anymore. (At my current job, everyone uses IntelliJ IDEA – whose theme support is only slightly better than Eclipse’s – and I’ve switched back to Emacs for C++ and JavaScript development.) Nonetheless, my ambition is to release Eclipse Color Theme 1.0, preferably this year, and there are still a few issues to be solved and improvements to be made.

One interesting topic for the future is Eclipse 4, which will introduce a new, themable UI. If I understood it correctly, plugins can either use the old or the new UI technology, which means it will probably take a while until all important plugins make use of it. Maybe it will make sense to support Ecilpse 4, we’ll wait and see.

Since Eclipse Color Theme is (in theory) modular, i.e. support for new editors can be added by other plugins, it would be nice to split it into multiple plugins, e.g. one for each Eclipse plugin package (JDT, WTP, CDT, PDT, …). Ideally, the developers of the package would also maintain the colour mappings, but I guess that’s wishful thinking.

If there is one thing I learned in this project, it’s how remarkably motivating it is to have lots of users and lots of feedback. Thanks to all of you writing emails, creating themes and donating money, you’re a great source of motivation.

12 Responses to Eclipse Color Theme

  1. ASoft says:

    really great and useful , but unfortunately I cannot use it because I’m behind a corporate firewall and there is no internet access on my PC ..
    Why you don’t offer an offline install version? SourceMate did that with their Plugin allowing people without direct internet access like me to use it.
    I wish you do the same …

  2. fhd says:

    Sure, we will add a downloadable update site, I’ve added an issue for this: https://github.com/eclipse-color-theme/eclipse-color-theme/issues/58

  3. Gilles says:

    Thanks for this plugin, it’s a great addition to eclipse. I have a suggestion: it would be very useful to have an ‘export theme …’ button in the preferences page to export to either an xml or epf file. I know I can create my own on the plugin website, but it would be practical to do it directly from the IDE, that would allow to have a few versions in progress to play with.

    Thanks again!

  4. fhd says:

    Exporting themes is a bit problematic, we would have to create a dedicated theme editor. We can’t just export the color preferences of a single editor, e.g. Java, because that wouldn’t map to the others. We need to generate files with our standarised theme format.

    If anyone wants to create a theme editor for use within Eclipse, go ahead though, we’d accept that patch :)

  5. Mike Viens says:

    As an added feature, if you could create a theme file from an existing Eclipse installation, that would save a lot of time having to do so via a web interface. A simple upload/update through the plugin interface would also be very helpful.

    It should not be difficult, just make sure that ALL color settings are retrieved. Currently, ECT does not handle all of the color-based settings. Thank you for a great plugin.

  6. Glen says:

    Hi Felix,

    Great work on the Eclipse Color Themes plug-in!

    I have a light sensitivity disability which means that working with UIs that have a white background gives me really bad headaches and migraines – so over many years each time I’ve had to set up a new Eclipse development environment (primarily for Java development), I’ve had to spend a while tweaking the Eclipse color and font settings so I can have the background black and text colors that are legible against a black background. This wastes time. I’ve been looking for theme capability in Eclipse for many years. Thanks for your efforts.

    I will be experimenting over the next week or so with this plug-in. Unfortunately it’s not much use to me today, as I was hoping to be able to export my existing colours to a theme file, so I can move my colours to another workspace – without having to export-import all settings, or cutting and pasting from one pref file to another. I understand the technical difficulties behind implementing an export feature in your plugin, so understand why you haven’t done it so far. There must be a way however to enable this kind of feature though.

    Anyway, keep up the good work. Well done!

    Glen

  7. Jonas says:

    Great plugin! Thanks for sharing!

    Someone mentioned an offline installer.. I have installed the plugin in an environment without internet access, but when I try to select a color theme I get the message “www.eclipsecolorthemes.org could not be found. Please check the name and try again.”.

    Is there any way I could download some XMLs for some popular color themes, and “install them” with the plugin so that I can use them without internet access? I understand I can download them, and select “Import a theme…”, but I would like a way to install them for all users.

    Thanks in advance!

  8. Felix H. Dahlke says:

    The plugin already includes all the themes you can select, it just uses eclipsecolorthemes.org to render the preview (we’re planning to fix that). You can just ignore the error and apply the theme anyway.

  9. Lola LB says:

    Just wondering when will support for CFBuilder be enabled . . .

  10. Jonas says:

    Thanks, that works. Probably should have tested that before posting, sorry about that.

  11. Judas.n says:

    I really appreciate your color,because my eyes are very comfortable.

  12. Lars Vogel says:

    Cool stuff. I also like the new effort of Roger to provide a dark styling for the Eclipse 4 platform.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>