# HG changeset patch # User Dirk Olmes # Date 1412040839 -7200 # Node ID 74d42171a531b4d41e0b25c0875b2a778aa3a7de # Parent 9c4944f26b0018418a7c22f67cfb33855a0ba55b# Parent e6872b8d42e2ffdf95063c821f472298dd17d1ff Automated merge with ssh://xanthippe//home/dirk/Projekte/Blog diff -r e6872b8d42e2 -r 74d42171a531 content/Eclipse/workspacemechanic.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/Eclipse/workspacemechanic.md Tue Sep 30 03:33:59 2014 +0200 @@ -0,0 +1,24 @@ +Title: Automating Eclipse Workspace Settings +Date: 2014-09-08 +Lang: en + +Working in a team of developers sometimes requires you to unify certain settings in the Eclipse workspace. We used to solve this manually by documenting the required settings on a wiki page. This woks only so good because everyone (including me) tends to forget about those settings and when crating a new workspace all is mixed up. + +Since manually managing the workspace settings does not quite work it would be good to automate the preference management. The [workspacemechanic plugin](https://code.google.com/a/eclipselabs.org/p/workspacemechanic/) comes in very handy here. It works quite simple: you install the plugin, define the settings you want to unify across all workspaces and distribute those rules. The plugin then checks your current preference settings and will allow you to fix anything that does not match the required setup. + +A rather undocumented feature of the plugin is how to distribute rules. Just put all rules on a HTTP server. Then, create a json document that references all these rules in the same directory as the rules files. Use this snippet as a template: + + { + type : 'com.google.eclipse.mechanic.UriTaskProviderModel', + metadata : { + name : 'Workspace Settings', + description : 'Sample Mandatory Workspace Settings', + contact: 'my@email.com' + }, + tasks : [ + 'MyFirstRule.epf', + 'MySecondRule.epf', + ] + } + +As the last step, configure the full URL to the json file as task source. The plugin will load these rules and apply them.