Eclipse syntax highlighting preferences save and restore

后端 未结 10 1897
甜味超标
甜味超标 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 15:53

    I'm using JBoss Developer Studio 10 with the Eclipse Neon 4.6 engine.

    All .prefs files are inside this path:

    /workspace/.metadata/.plugins/org.eclipse.core.runtime/.sett‌​ings
    

    Update: I found a similar structure on this path too:

    \RedHat\JBossDev\studio\configuration\.settings

    It's my IDE folder plus \configuration\.settings

    I recommend search for org.eclipse.*ui*.prefs instead *.prefs to refine your result.

    The principal config files are:

    • org.eclipse.jdt.ui.prefs
      • Java Syntax Color Settings
    • org.eclipse.ui.editors.prefs
      • Text Editor Settings
    • org.eclipse.cdt.ui.prefs
      • Formatter Settings
    • org.eclipse.wst.jsdt.ui.prefs
      • JavaScript Syntax Color Settings
    • org.eclipse.jst.jsp.ui.prefs
    • org.eclipse.wst.css.ui.prefs
    • org.eclipse.wst.html.ui.prefs
    • org.eclipse.wst.json.ui.prefs
    • org.eclipse.wst.dtd.ui.prefs
    • org.eclipse.wst.xml.ui.prefs
    • org.eclipse.wst.xsl.ui.prefs

    If have a problematic workspace:

    1. Copy the files above
    2. Create a new workspace
    3. Copy and Replace that files in your new workspace

    This will recover perfectly your custom editors color settings. For me worked very well.

提交回复
热议问题