- Install the intellij plugin for eclipse code formatting: http://code.google.com/p/eclipse-code-formatter-intellij-plugin/wiki/HowTo (unzip in the /plugins directory, restart IJ, then you can see it is installed if you have "Eclipse Code Formatter" in your IJ settings).
- Use the RHQ Project's Eclipse formatter config file found at etc/eclipse-tools/templates/formatter-profile.xml
- Set the import order in the plugin to manual configuration with the following packages: java;javax;com;org;org.jboss;org.rhq
- Turn off intellij's import optimizer: Preferences
> Editor --> Auto Import (uncheck the java settings)
> Code Style --> Java --> Imports
- Check Use single class import
- Change Class count to use import with '*' to 99
- Change Names count to use static import with '*' to 99
You may have to restart Intellij Idea at this point.
Here's the idea.vmoptions file I use:
If you have lots of RAM, I'd set the max heap size even higher.