
Around unary, assignment operators (if it’s set for ‘before’ and ‘after’ in Eclipse).Before parentheses of: ‘try’, ‘for’, ’while’, ‘switch’, method, ’if’, ‘catch’, method, method call, ‘synchronized’.
Within parentheses of: annotation, ‘for’, ‘if’, ‘catch’ ’while’, ’switch’, method, empty method, parenthesized expression, method call, type cast, ‘synchronized’. Before/after comma (as set for Eclipse method declaration parameters). Usage of Tab only for leading indentation (Smart Tabs). All you need is to export settings from Eclipse (go to Eclipse’s Preferences → Java → Code Style → Formatter and export the settings to an XML file via the Export All button.), and then open IntelliJ IDEA Settings → Code Style → Java, click Manage, and import that XML file by simply clicking Import.Ĭurrently, IntelliJ IDEA supports the import of the following settings: Now things are going to be a bit easier, because IntelliJ IDEA 13 is capable of importing code formatter settings from Eclipse without the use of any plugins. In most cases the plugin is fine, but because it’s calling Eclipse API directly from IntelliJ IDEA, there can be problems with processing such actions as refactoring, code generation, etc., so it’s not always that helpful. You may have heard about Eclipse Code Formatter, a quite popular IntelliJ IDEA plugin that lets you, what else, - use Eclipse’s code formatter with IntelliJ IDEA.
One of the most frequently encountered problems is code style, that has to be consistent in the entire project. And then there’s collaboration, and it sometimes is harder when different sorts of IDEs are involved. Many development teams are using more than one IDE because it’s a very personal matter, and people always seek what best suits their individual needs.