IntelliJ plugin - Allows using Eclipse's code formatter directly from IntelliJ.

3 years after

Allows using Eclipse's code formatter directly from IntelliJ. Solves the problem of maintaining a common code style in team environments where both IDEA and Eclipse are used.

Currently supports formatting of

  • Java (also emulates Eclipse's imports optimizing)
  • JavaScript
  • GWT
  • C/C++


  • Install the plugin
  • Configure it
    • Get Eclipse formatter settings file:
    • Either export formatter profiles to get *.xml file
      • Go to Eclipse | Windows | Preferences | Java | Code Style | Formatter
      • Eclipse do not export default profiles, so you have to make your own ("New" button)
      • Export the profile ("Export all..." button.)
      • The result should look like this
    • Or enable project specific formatter settings to get org.eclipse.jdt.core.prefs
      • With your project open in Eclipse's workspace, right-click the project and choose Properties.
      • Go to Java Code Style | Formatter and select Enable project specific settings.
      • Click OK to save the settings.
      • Go to the .settings directory inside your project's directory. There you will find the org.eclipse.jdt.core.prefs file which contains the Eclipse formatter settings.
      • The result should look like this
    • Open a project in IntelliJ
    • Set path to the config file (IntelliJ | Settings | Other Settings | Eclipse Code Formatter | field "Eclipse preference file")
    • When using exported profiles(xml file), select desired profile in the combobox "Java formatter profile"
    • Check "Optimizing Imports" configuration
    • Set import order
      • Either leave the default
      • Or set path to Eclipse configuration file:
        • Go to Eclise | Windows | Preferences | Java | Code Style | Organize Imports
          • Either click on "Export...", (example)
          • Or enable project specific settings and use "org.eclipse.jdt.ui.prefs" file which should contain the line "org.eclipse.jdt.ui.importorder=..."
    • Value of "Class count to use import with ''" and "Name count to use static import with ''" (Settings | Editor | Code Style | Java | Imports) for Idea 14 or (Settings | Editor | Code Style | Imports) for older Idea - Eclipse uses value of 99 by default
    • For versions lower than 4.0 - make sure to keep disabled IntelliJ's Import Optimizing in the reformat dialog (Settings | Editor | Show "Reformat Code" dialog), the plugin will take care of imports anyway
    • For versions higher than 4.0 - imports will be reordered together with normal IntelliJ's import optimizing
    • Disable "Optimize imports on the fly"
  • Format code as usual, notice the green bubble notification about successful formatting
    • notifications can be disabled at (Settings | Notifications)
  • Use Ctrl+Alt+O as usual, it will use this plugin
  • Use Ctrl + ~ for quick switch between formatters or icon at the main toolbar
  • [Give it 5 stars] (
  • [Donate some money] (

Possible problems with Java formatting

  • nothing was formatted or formatting failed
    • make sure you are using proper language level (Main Menu | File | Project Structure)
  • trailing spaces inside javadocs are stripped.
    • set "Strip trailing spaces on save" to "None"
  • file is formatted differently
    • The file is actually formatted fine, it just looks different in the editor, as the tab size and indendation are set differently in IntelliJ (Settings | Editor | Code Style | Java) than in Eclipse. Using of either tab only or space only whitespace is recommended.
    • Or it is a bug.
  • Eclipse indendation is configured for 2 spaces, but a new line gets indented by 4 spaces when Enter is pressed.
    • change code style in IntelliJ. Not all things get formatted by this plugin when you type them.
  • If nothing helps


If it is mysteriously not working, go to Main Menu | Help | Edit Debug Settings and add:


Try to reformat something and send me the log...

Related Repositories



A Gradle plugin to format Java source code ...



Automatically exported from ...

Top Contributors

krasa breitwieserCern danmidwood hrchu


-   cdtFix zip tar
-   cdt2 zip tar
-   cdt zip tar
- zip tar
- zip tar
- zip tar
- zip tar
- zip tar
- zip tar
-   15.3 zip tar
- zip tar
- zip tar
- zip tar