When you switch to a new workspace for the same project in Eclipse you generally have a lot of work to do before you start import or creating projects. This work majorly involves setting of preferences and other settings to your new workspace. This sometimes becomes painful and tiresome especially if you have a lot or project specific preferences to be applied to the workspace or have customized many of the default ones.

Also, it is many a times, error prone since you might forget some preferences and end up factoring why your code is not behaving the same way as it used to in your earlier workspace.

The secret to make this easier is to find out where does eclipse store this settings and thankfully it is easy enough. Eclipse stores all preferences in text format, properly separated for each individual plugin. So, migrating the settings from one workspace to another is just simple, copy-paste the setting files.

The location where the preferences are kept is :
<workspace_location>\.metadata\.plugins\ org.eclipse.core.runtime\.settings

eclipse_workspace_preferences

Check the folder and try to see what is within each file and you will see all your plugin settings in it.

So what you would need to do is to copy org.eclipse.core.runtime folder and paste it in your other workspace inside \.metadata\.plugins. Do not copy any other folder or else it may lead to some unusual workspace behavior.

If you want to transfer only the preference for a particular plugin then you just need to copy that individual file alone, from within this folder.

Action Steps:

  • Switch your existing workspace to a temporary workspace.
  • Close eclipse
  • Copy the above folder and start eclipse with the temporary workspace
  • Now check all your earlier settings will be reflected

Simple, isn’t it? Let me know if it worked for you.


Stumble Digg Technorati Subscribe Delicious