Mercurial > hg > Blog
annotate content/Eclipse/workspacemechanic.md @ 37:9c4944f26b00
new blog post about the workspacemechanic plugin
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Mon, 08 Sep 2014 11:34:16 +0200 |
parents | |
children | 47fa61e1845e |
rev | line source |
---|---|
37
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
1 Title: Automating Eclipse Workspace Settings |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
2 Date: 2014-09-08 |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
3 Lang: en |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
4 |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
5 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. |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
6 |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
7 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. |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
8 |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
9 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: |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
10 |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
11 { |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
12 type : 'com.google.eclipse.mechanic.UriTaskProviderModel', |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
13 metadata : { |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
14 name : 'Workspace Settings', |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
15 description : 'Sample Mandatory Workspace Settings', |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
16 contact: 'my@email.com' |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
17 }, |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
18 tasks : [ |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
19 'MyFirstRule.epf', |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
20 'MySecondRule.epf', |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
21 ] |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
22 } |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
23 |
9c4944f26b00
new blog post about the workspacemechanic plugin
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
24 As the last step, configure the full URL to the json file as task source. The plugin will load these rules and apply them. |