Maintaining a common set of Eclipse preferences

后端 未结 5 1752
轻奢々
轻奢々 2020-12-01 03:41

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

  • compiler settings;
  • font sizes/families;
  • code formatter;
相关标签:
5条回答
  • 2020-12-01 04:03

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

    0 讨论(0)
  • 2020-12-01 04:04

    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.

    0 讨论(0)
  • 2020-12-01 04:06

    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:

    • Oomph: A Matter of Preference -- Blog post providing overview of preference tool
    • Oomph Setup Documentation -- Official documentation
    • Automating Project-specific Eclipse Setups with Oomph -- Walks through how to set up Eclipse to have default settings for new workspaces and automatically update the settings for existing workspaces
    0 讨论(0)
  • 2020-12-01 04:16

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

    0 讨论(0)
  • 2020-12-01 04:20

    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
    
    0 讨论(0)
提交回复
热议问题