Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Howto Link all projects to same code formatter rules file
icon5.gif  Howto Link all projects to same code formatter rules file [message #992375] Fri, 21 December 2012 13:52 Go to next message
Patrick W. is currently offline Patrick W.Friend
Messages: 2
Registered: December 2012
Junior Member
Hey Eclipse-Users,

I have about 50 Eclipse Java projects form different developers and I want to use the same code formatter rules for all projects.

So I create a set of formatter rules and export them into a XML file. Is it possible to link all projects to this file? So I only have to change this single file when updating the formatting rules?

The only way I found so far is to update all projects manually by importing with the XML file. Then rules are then copied to org.eclipse.jdt.code.prefs. So changing rules is very expensive.

Cheers,
Patrick
Re: Howto Link all projects to same code formatter rules file [message #992738 is a reply to message #992375] Sat, 22 December 2012 13:11 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

I don't think that it can be done, personnaly when I have to update the configuration of the formatter on my projects, I import the XML file on one project and then I copy the content of the file ".settings/org.eclipse.jdt.code.prefs" of this project and paster it in all the other projects. It's a bit faster than importing the XML file in all the projects.

Regards,

Stephane Begaudeau, Obeo

--
Twitter: @sbegaudeau
Google+: +stephane.begaudeau
Blog: http://stephanebegaudeau.tumblr.com | Eclipse Java Development Tools Tips and Tricks
Re: Howto Link all projects to same code formatter rules file [message #992812 is a reply to message #992738] Sat, 22 December 2012 18:20 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
I'm surprised you want to re-format projects from different developers, rather than letting each project define its own formatting rules.

Secondly, wouldn't per-workspace preferences serve your needs?

Third, if you want to synchronize settings between developers / projects / workspaces, you may want to use a plug-in like workspace mechanic.

my 2c.
Re: Howto Link all projects to same code formatter rules file [message #997371 is a reply to message #992812] Mon, 07 January 2013 08:51 Go to previous message
Patrick W. is currently offline Patrick W.Friend
Messages: 2
Registered: December 2012
Junior Member
Thank's for your answers. I will have a look on your suggestions.
Previous Topic:No Java Perspective
Next Topic:Java Inspector ignores static imports
Goto Forum:
  


Current Time: Fri Apr 26 13:14:56 GMT 2024

Powered by FUDForum. Page generated in 0.02647 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top