jQuery in Action, 3rd edition
The moose likes IDEs, Version Control and other tools and the fly likes IDEA 4: Export Code Formatter Settings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "IDEA 4: Export Code Formatter Settings" Watch "IDEA 4: Export Code Formatter Settings" New topic

IDEA 4: Export Code Formatter Settings

Jessica Sant

Joined: Oct 17, 2001
Posts: 4313

Most the guys in my group use Eclipse, and it has a snazzy little feature where one person can define the code format settings and export it to a file, then everyone else can just import that file and voila--- you're all using the same code formating.
In IDEA 4.0 -- I see I can Save different settings under different names, but don't see anything about export / import -- anyone know if this is do-able?

- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Unfortunately, IDEA does not offer an export feature... but that never stopped me. Here is what you do:
Steps to "Export" your Code Style Scheme
1. Configure your Code Style Settings, select Save As and give it a decent name.
2. Jump to your file system and find your home directory. This is where IDEA stores its configuration settings by default, in a directory called .IntelliJIdea. Goto USER_HOME\.IntelliJIdea\config\codestyles and you will find an xml file with the same name you provided earlier. This holds all of our Code Style Scheme settings.
3. Copy said xml file and pass this around your team, stick a copy in cvs, whatever you want to share it among the team.
4. Done.
Steps to "Import" a Code Style Scheme
1. Close IDEA if it is currently running.
2. Copy the Code Style Scheme xml file you want to import to USER_HOME\.IntelliJIdea\config\codestyles.
3. Start IDEA and go to the Global Code Style Configuration screen. The file you just copied should now be available in the Scheme select box, choose it and hit apply.
4. Done.
It is sorta covered in the JavaRanch Style Guide.
subject: IDEA 4: Export Code Formatter Settings
It's not a secret anymore!