My move on saving energy everyday – customize font colors in Flex Builder 2.0/Eclipse

8 10 2007

Saving energy has become bigger these days. When I heard about “black Google“, I was surprised by how often we could save energy everyday. Small steps count, especially when a lot of people are doing it together.

Honestly my Google pages are only open for 10 minutes max per day, regardless of the fact that I use Google everyday. I program everyday, more than 6 hours. (Leaving 2 hours to reading news, livedocs, blogs, tutorials, books, etc.) I’d be saving so much more energy if I made my IDE black instead of white. So I followed the “Black Google” methodology and made my Flex Builder/Eclipse background black, which I think is good to my eyes anyway. Here is how I did it. (I am on Windows XP right now, will update this entry when I switch to a Mac, if needed.)

[+] Open Eclipse, go to Windows-> Preferences-> General-> Editors-> Text Editors. Select “Background Color” in the right hand side list, uncheck the System Default checkbox, and change it to black. Select “Foreground color” in the list, uncheck the System Default checkbox, and change it to white. Change other colors in the list if you want.

[+] Close Eclipse. Find the \plugins directory under the Eclipse install folder. Find \com.adobe.flexbuilder.editors.common_2.0.155577 or something similar there. (In my case, it is C:\Program Files\eclipse\plugins\ com.adobe.flexbuilder.editors.common_2.0.155577)

[+] Find a file named “common.jar” under the directory. polyGeek suggested to back up the file somewhere else before making changes to it, I followed it.

[+] Change the file extension from jar to zip, so “common.jar” is now named ““. Unzip it.

[+] In the unzipped content, find com\adobe\flexbuilder\editors\common\color\Color.xml. This file is where Eclipse looks for all the font colors. Play with the hex numbers and repeat the following steps to get it show up the way you want.

[+]Don’t touch other files in the unzipped content except for the Color.xml. Zip the content back to a file called ““. (You can do this by selecting the 2 folders: \com and \META-INF, right click -> Add to zip -> name the file ““.) Rename “” to “common.jar” and make sure the file is at its original directory.

[+]Open Eclipse. You should see the font color(s) have been updated according to the Color.xml file. If you encounter an error when you use Flex Builder, you’ve messed up the .xml file or the .jar file or both. This is when you want to use the back up common.jar. I have messed it up more than once before I got it right.

Thanks to polyGeek’s blog entry, without which I had no way figuring it out on my own. (Although his last steps on how to zip the files back really confused me.)

[*] updated Jan.07.08. Just tried the technique on an Intel MAC, and it worked beautifully. Cool.
[*] updated May 28.08. To get the work done in Flex Builder 3 is pretty straightforward. Go to Preferences->Flex->Editors->Syntax Coloring and click on the arrow next to “ActionScript” to pick your colors for keyword etc. Then follow the links on the top of window to customize the “Text Editors” and the “Colors and Fonts” preferences. Good job guys. 🙂




3 responses

9 10 2007

Hey, those last two steps confused the hell out of me to. 🙂

Good news, in FlexBuilder 3 we can change all those colors in the editor. Thank the Gods! Actually, thank David Zuckerman. I think he’s the Adobe developer who added this functionality.

25 06 2008
Johan Nyberg

Hey, thanks a bunch! You saved my day. I also use black as background color to spare my eyes. And I still have to use Flex2 for a couple of more days before my upgrade of Flex3 arrives 🙂

9 10 2008

Regarding Flex3, too bad u can’t change the colors of puncations or numbers from black… Makes it impossible to go dark… trying to hack the flex 3 common.jar but it’s quite a bit different.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: