Saturday, July 25, 2009

Creating a dark theme (and exporting and importing Eclipse preferences)

Usually I use my colors with the default settings that Eclipse provides, but I know many people that like alternative appearances for Eclipse (usually using a dark theme), so, I decided to give it a try...

For changing the default colors, there are some places that you have to look through in the window > preferences menu:
  • General > Editors > Text Editors (to set the background color / selection color, etc. for all editors)
  • General > Editors > Text Editors > Annotations (to set the colors for the occurrences highlight, tasks, etc.)
  • Pydev > Editor (to set the pydev editor-related colors)
  • General > Appearance > Colors an Fonts (to set what's not available in the other places)
Now, after you've properly set those colors, one thing you should really do is export the preferences you've just changed so that you can import them later.

To do that, go to File > Export > Preferences and export all the preferences to a file, then, open that file and remove all the non-color related preferences (except the file_export_version, which Eclipse requires when doing the import) -- note that you can keep other preferences you enter all the time too, and it might be easier doing it with a clean Eclipse install just with what you want to config (so that you don't have too many preferences in that preferences file).

Later, you can import those preferences in Eclipse through File > Import > Preferences.

The preferences for the dark theme I'm using gives the result below (note that you may have to restart Eclipse so that the left ruler looks correct):

This can be reproduced by saving the contents below in a 'dark_theme.epf' file (the extension stands for eclipse preferences file) and importing it.


Update: Added the debug call stack and debug current line annotations to appear as dashed box and box.

Wednesday, July 08, 2009

Pydev 1.4.7 released

Pydev 1.4.7 is now available for download.

Aside from the regular update site, there are new mirrors for getting pydev/pydev extensions, so the update site mirrors are available as follows: (contains both, pydev and pydev extensions) (contains only pydev) (contains only pydev) (contains only pydev extensions)

The major features (Iron Python integration and the new way of running as unit-test / running the current editor with the configured nature) were previously discussed in the following post: and are now available in this release.

Note that the Iron Python debugger is still not available in this release, but it seems that the next release of Iron Python will have the sys.settrace() support, so, there's a chance that the next Pydev version has a debugger for it.

Aside from those features, other noteworthy things in this release are:
  • the debug console can be used with the remote debugger (pydev extensions)
  • the auto-config was fixed
  • context-independent completions are now offered when the type inference is not able to get context-dependent completions on a given token (pydev extensions)
  • the google app engine integration had some fixes