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 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.


Hooray I’m Eclipse contributor

06.08.2014 by Dirk Olmes

While doing a big refactoring for a customer I stumbled over a missing feature in Eclipse’s refactoring dialog: you cannot double-click to expand packages in the dialog that selects the destination when moving classes.

This was a good chance to actually do some hacking in JDT. I was able …

read more

Eclipse Kepler rulez

28.06.2013 by Dirk Olmes

I’ve been trying Eclipse Juno for a short time only - way too slow for daily usage with more than 70 projects and some thousand classes.

I was anxiously waiting for the release of Kepler. As soon as it came out I downloaded the Java developer edition and tested it …

read more

Eclipse link files

03.03.2009 by Dirk Olmes

Starting with Eclipse Ganymede you have a dropins folder into which you can drop custom plugins that don’t come via an update site.

Some plugins come with a feature, however so you’re forced to mainain a directory structure below the dropins folder. Add working across different Eclipse installations …

read more

Validating XML documents against your own schemas with Eclipse

07.06.2007 by Dirk Olmes

This week I started to work on Mule 2.0 which will be based on Spring. We’re dropping our own custom config format in favor of Spring’s xml format. This requires me to design the schema for the transports I’m working on as well as convert the …

read more