Eclipse syntax highlighting preferences save and restore

后端 未结 10 1863
甜味超标
甜味超标 2020-12-22 15:20

I spend some time customizing the colors for syntax highlighting in Eclipse (Java, JSP, HTML, CSS, etc.) but whenever I try to export these settings via File|Export|General|

相关标签:
10条回答
  • 2020-12-22 16:05

    Eclipse CDT stores 'Syntax coloring' in the file org.eclipse.cdt.ui.prefs

    This is located for example here: C:\eclipse\workspace.metadata.plugins\org.eclipse.core.runtime.settings\

    Copy and paste over the top of the one in your new eclipse instance. This worked for me when moving from 3.4 to 3.5

    0 讨论(0)
  • 2020-12-22 16:09

    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.

    0 讨论(0)
  • 2020-12-22 16:09

    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

    0 讨论(0)
  • 2020-12-22 16:11

    I faced the same problem few days ago. The easiest way to restore the defaults is to import the default theme again, which you can find under: http://eclipsecolorthemes.org/?view=theme&id=790

    0 讨论(0)
提交回复
热议问题