2012年1月3日 星期二

Note: how to preserve your Eclipse work space setting?

Start a new Eclipse workspace is easy: you start your eclipse, choose an empty folder, then Eclipse will make it as a new workspace for you.

The problem is: all your beloved settings are gone, your Syntax Coloring, crafted templates, key bindings... every thing.

I hate to redo the whole stuff again and again, so I spent some time to investigate how to copy the old setting from an existing workspace to a new one.

The settings that I want to preserve are:

  1. Syntax Coloring: Color has meaning to me, when code is rendered in the way that I defined, I get best performance to read it.
  2. Comments of Class: the author name and some good stuff that I want to have in java class header.
  3. Key bindings: I defined some thing that is quite useful to me.
  4. Workbench Perspective: I have three monitor and I use them all by customize my own workbench perspective.
  5. Annotation: I don't like the original color settings of eclipse annotation, so I customized it.
  6. WTP Server runtime configs: you have multiple server runtime, and you definitely don't want to miss them.
All these settings are inside /.metadata/.plugins/org.eclipse.core.runtime/.settings/, you don't have to look other place else.

Here is the investigation result of each settings:

  1. org.eclipse.jdt.core.prefs: the settings of your defult java classpath variables, it will be used in all of projects inside this workspace, you can see how this setting take effect in: windows->Preferences->Java->Build Path -> Classpath Variable.
  2. org.eclipse.ui.editors.prefs: the place to customize your general Text Editor settings, like your occurrences color.
  3. org.eclipse.jdt.launching.prefs: Place to store the settings of "Installed JREs" 
  4. org.eclipse.jdt.ui.prefs: all your syntax color and code template settings are stored here.
  5. org.eclipse.jst.server.[server].core.prefs: your server definition settings, in my case I got only Tomcat, so I has only one of this prefs file with [server] been replaced with Tomcat.
  6. org.eclipse.ui.workbench.prefs: the place to store your workbench relative settings, such as your own custom perspective.
  7. org.eclipse.wst.server.core.prefs: place to store your server runtime settings, the stuff in "servers" view.

1 則留言:

  1. ㄜ... Key binding 跟 Perspective (不確定你的 Workbench 是否可以)是可以透過 Import/Export General 下的 Preferences 解決,還可以把 epf 檔要求其他人也沿用

    至於其他的,因為我都用 default 值沒調 or 沒有用到,所以不確定有沒有包含在 Preference 裡頭

    提供參考,也許是我英文爛,誤會了其中一些名詞.....

    回覆刪除