I just counted the number of active eclipse workspace I have: Eight! I’m sure there are other developers which even have more than eight? Eclipse maintains many settings inside the workspace .metadata folder (see my post on CodeWarrior Tool Tip #1: Improve performance by cleaning house in the Eclipse workspace). The question is: how can I copy or transfer my carefully balanced workspace settings to another workspace?
The solution is not that obvious. But is straight forward once I knew about it: I can export and import the workspace settings. For this I select the menu File > Export and select General > Preferences:
The next dialog gives me the opportunity to select what to export (I usually select ‘Export all’) and to which file (which is a normal text file):
Applying the preferences (or settings) to another workspace just works the other way round: I use the menu File > Import > General > Preferences. Simple like that :-).
Hint: I use File > Export > General > Preferences as well to have a backup of my preferences (in case eclipse might screw up my workspace). Or to store the settings in a version control system.
Happy Preferencing 🙂
Pingback: Managing recent workspaces | MCU on Eclipse
Thanks for that awesome posting. It saved MUCH time 🙂
LikeLike
Pingback: Eclipse global preferences | MCU on Eclipse
Pingback: Customize my Workspace Perspectives | MCU on Eclipse
Thanks for the tip.
BTW, the given link of “CodeWarrior Tool Tip #1…” doesn’t work anymore. You moved it to blogs.freescale.com/2011/11/10/codewarrior-tool-tip-1-improve-performance-by-cleaning-house-in-the-eclipse-workspace/
HTH.
LikeLike
Thanks for reporting the broken link. Fixed now :-).
LikeLike
Pingback: Spaces vs. Tabs in Eclipse | MCU on Eclipse
Thanks, this is helpful. I hope to share preferences across a team; putting the preferences file in a version control system should help me do that.
LikeLike
As the preference file is in XML format, it is easy to store and distribute it using a version control system. Only a heads up: I have found that some plugins might not export their settings (for whatever reasons, a bug to me). So always good to verify things. Apart of that, I store the settings as well in my SVN as a ‘backup’: because it happens from time to time that my workspace .metadata gets corrupted. That way I can easily re-apply my workspace settings again.
LikeLike
Thanks for your advice. The only problem I see is that the team may forget to import the preferences when creating new workspaces.
LikeLike
Yes, this is a problem. But have a look at https://mcuoneclipse.wordpress.com/2012/04/06/eclipse-global-preferences/ which proposes a way to apply settings for every new workspace. There is another way to control the workspace perspectives too: https://mcuoneclipse.wordpress.com/2012/07/14/customize-my-workspace-perspectives/
LikeLike
Thanks again. The trouble with Eclipse is that it is very complicated!
LikeLike
Yes, at the beginning things are a little bit overwhelming. The good news is that after a learning curve I cannot imagine any more to use another IDE. So I hope as well that my posts might help finding a way through everything.
LikeLike
Pingback: Eclipse Workspace Tips | MCU on Eclipse
This one tip alone saves me endless frustration! I archive our work to the repository after changes throughout the day. It is often necessary to export a past version and build a new work space (I don’t want to risk any corruption or error in the production system), then import the older project code (I don’t archive the eclipse system). But I always had to go through and manually put all the settings back into eclipse. What a mess! Now I just save the settings with the archive and it is always there for a new work space. Thank you.
LikeLike
Pingback: Constructing a Classroom IDE with Eclipse for ARM | MCU on Eclipse
Pingback: Toolchain: KSDK 1.2.0 with Eclipse 4.4 (Luna) and GNU ARM Plugin | Centaurian
This is not a good solution. It does not copy the appearance settings, keyboard shortcuts or snippets.
LikeLiked by 1 person
I’m not sure about appearance settings, but I can confirm that Keyboard shortcuts are now a selection choice in what you can to export from the Workspace. In my Eclipse [2021-12] I have 5 selectable categories of preferences to export.
LikeLiked by 1 person
Yes, I can confirm this too, and it is even there in Eclipse [2021-06]. You have to change the key bindings, and then it shows up.
Thanks for the reminder about this topic!
LikeLike
Thinking about the appearance setting, I was pretty sure I’ve done this before too. So a quick search on the internet and below is a post showing two possible solutions. Note that the bug mentioned in the post, has long since been fixed and I can confirm both solutions work with my Eclipse.
In summary:
1. When creating a new Workspace, you have the option to copy existing settings
2. Save your current Perspective (window layout) with a custom name. Make sure to open that custom perspective. Now export your Workspace settings as usual. The window appearance settings get exported too.
http://www.eclipseonetips.com/2010/03/22/share-eclipse-perspective-layouts-across-multiple-workspaces/
LikeLiked by 1 person
But this saves only very limited amount of settings, right?
Some of the essential preferences are not exported this way.
LikeLiked by 1 person
Yes, unfortunately. It is up to the plugin implementer if they save things, and unfortunately not all follow the rules as it seems.
LikeLike
Pingback: Eclipse Workspaces: What for and why? – Row Coding
Pingback: Eclipse Workspaces: What for and why? – w3toppers.com