Question

I want to know if there is some good way to automatically configure Eclipse workspace of newly checked out project.

I've got a project where I use gradle to both build and configure all of its subprojects. Since I want to enforce some good practices I also use e.g. FindBugs plugin, and tweaked Eclipse configuration (more/better compiler warnings, formatting, favorites, save actions and so on).

I think that storing .metadata directory in git is not a good idea - a lot of settings works only for certain version and breaks after update, some settings are stored in binary files and so on.

Build-in import/export tool handles only some settings - AFAIK it leaves e.g. save actions, favorites and formatting alone and don't handle them.

Then there's Workspace Mechanic plugin that allows to record settings change - but it doesn't allow to update existing record, only create new file or override old one, which leaves me with a lot of tasks to run - and it's not bug free: several times file_export_version=3.0 line was placed in a wrong place, so some settings couldn't be imported until I fixed that manually, and few times after import installation stopped working correctly... (even though I imported settings that I just exported!).

Do you have some good, automated, portable solution? Perhaps some tweaked way of using already mentioned tools? It might be more complicated that just running one script - I just want to make sure that all of changes are applied, I didn't miss anything, I don't have to change each and every option manually and it will still work when I apply it to an upgraded Eclipse.

Was it helpful?

Solution

There's a Workspace Preferences Transferrer that might help you. It allows you to transfer pretty much all (yeah, not just all) of the current workspace preferences to the new one when switching.

For my personal case it misses only one setting (look'n'feel) - so all in all it saves a lot of time compared to doing it manually.

OTHER TIPS

Based on my understanding on your query

Clone a new git repo and point the same repo location as your eclipse workspace . Import your projects by referring to the same git repo itself. By this way all the changes in your code will automatically be reflected in the local git repo and you can push the code to remote later

Hope this is what you require

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top