Eclipse Color Theme
Join the DZone community and get the full member experience.Join For Free
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.
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.
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.
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.
Opinions expressed by DZone contributors are their own.