Robert Munteanu
Robert Munteanu

Reputation: 68268

Maintaining a common set of Eclipse preferences

Whenever I switch workspaces/Eclipse installs I need to copy/redo the preferences:

I would like to maintain these settings in an unitary way, preferrably under source control. How can I do that?


I know about 'copy settings' when creating a new workspace, but it does not keep updated copies.

Upvotes: 34

Views: 11730

Answers (5)

Miles
Miles

Reputation: 32458

Eclipse now ships with a tool called Oomph Setup. This tool can be used to record the preference changes that happen in your workspace, synchronize those preferences across multiple machines using an online service, and apply the preferences to both new and existing workspaces.

"Oomph" is actually a broader set of tools and low-level frameworks that are used throughout the Eclipse installation process, and it provides for very powerful automation possibilities, so the documentation is sometimes hard to follow for an end user who's just interested in simple preference synchronization. Here are a collection of links about Oomph Setup that I found helpful:

Upvotes: 3

VonC
VonC

Reputation: 1323303

You now have a good example of a separate project maintaining Eclipse preferences, as plugin.

See the saneclipse project from Lars Vogel.

You also have the associated vogellacompany/com.vogella.saneclipse repo, which will tweak and fine-tune the settings of:

com.vogella.saneclipse.preferences/.settings/org.eclipse.jdt.core.prefs
com.vogella.saneclipse.preferences/.settings/org.eclipse.core.runtime.prefs
com.vogella.saneclipse.preferences/.settings/org.eclipse.core.resources.prefs
com.vogella.saneclipse.templates/.settings/org.eclipse.jdt.core.prefs
com.vogella.saneclipse.fileextensions/.settings/org.eclipse.jdt.core.prefs
com.vogella.saneclipse.fileextensions/.settings/org.eclipse.pde.core.prefs

Upvotes: 2

VonC
VonC

Reputation: 1323303

You could of course export/import those settings.

The other approach is to enable project specific settings for some settings.

http://www.peterfriese.de/wp-content/downloads/images/formatter_project_specific_settings.jpg

We have a very small Git repository with those kind of files:

http://www.mkyong.com/wp-content/uploads/2009/01/wicket-examples-7.jpg

  • .settings/org.eclipse.jdt.core.prefs (compiler problem settings and formatter rules)
  • .settings/org.eclipse.jdt.ui.pref (cleanup rules, common code templates)

The common settings are just copied/merged in each projects .settings directory, ensuring common rules amongst all projects, whatever the workspace.

Upvotes: 19

walderik
walderik

Reputation: 111

You could also try Workspace Mechanic. It works perfect for this. http://code.google.com/a/eclipselabs.org/p/workspacemechanic/

Upvotes: 6

zvikico
zvikico

Reputation: 9825

Check out Pulse Freelance Edition. It has the ability to sync workspaces (commercial).

Upvotes: 1

Related Questions