Is there a way to generate a eclipse code formatter xml which matches Intellij IDEA code formatting rules?
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.
Go to Source | Format Document or press Ctrl+Shift+F.
From the main menu, select File | Export | Project to Eclipse…. The Export to Eclipse dialog displays the list of modules that have not been converted and switched to use the Eclipse format yet (the modules that have the IntelliJ IDEA module format . iml). Select the modules you want to export.
At the moment there is no way to export IntelliJ code style to eclipse. You need to do it the other way around.
You can also check IntelliJ plugin called "Eclipse Code Formatter" (link), but it the same way, from Eclipse to IntelliJ.
I'm using IntelliJ 14.1.4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With