Eclipse syntax highlighting preferences save and restore

If you want to be a little more fine grained on what you migrate, the syntax highlighting rules are the lines starting with semanticHighlighting on workspace-indigo/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs

Doing this, I was able to migrate my syntax highlighting from Helios to Indigo


I finally figured out how to do this.

I just wanted to mention beforehand that I did try to start with a fresh Eclipse install, export the preferences to a .epf file, change just one single setting, export again, and compare the files. To my surprise, trying to import settings from a minimal .epf file did not work reliably either.

The solution that worked for me was to copy these files: {Eclipse workspace directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings/*.prefs

I tried a fresh Eclipse install on another machine and after copying those files over, all my settings were restored perfectly.


The solution was to copy SOME - not all - of the files from {workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/*.prefs into my other workspace.

In particular (per the https://stackoverflow.com/questions/96981/color-themes-for-eclipse thread):

org.eclipse.jdt.ui.prefs = Syntax Coloring    
org.eclipse.ui.editors.prefs = Text Editors

Copying other files caused things to break.

There are a couple of notes to add:

  1. I had to copy the aforementioned pair of files several times before I got the correct syntax coloring.
  2. Be sure to close the workspace, if it's open in Eclipse, before copying the files.

This worked with Eclipse Helios.