Eclipse Code Formatter

Compatible with: IntelliJ IDEA PhpStorm WebStorm PyCharm RubyMine AppCode CLion Gogland DataGrip Rider MPS Android Studio
Aug 02, 2017
861 465
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.

Go to https://github.com/krasa/EclipseCodeFormatter#instructions for instructions how to use it.

Currently supports formatting of
-Java (bundled Eclipse 4.7 Oxygen (requires JRE 1.8) and 4.4 libs, also emulates Eclipse's imports optimizing, configurable external Eclipse location for Eclipse 4.5+, Workspace Mechanic support)
-C/C++ (Eclipse 4.6.3 (requires JRE 1.7))
-JavaScript (Eclipse 4.4)
-GWT (Eclipse 4.4)

Small donations are welcomed.

Download plugin

Recent change notes


16.6, 17.2 (2017-08-02)
- Global profiles sync fix
16.5 (2017-07-20)
- Release of 17.1 with Eclipse 4.6.3
17.1 (2017-07-14)
- Javadoc indent fix
- Improved performance
17.0 (2017-07-07)
- Bundled formatters from Eclipse 4.7
- Introduced Project Specific profile
- Migrated mixc.xml persistence to a separate file (.idea/eclipseCodeFormatter.xml)
- Added live template for surrounding with @formatter:off
- Added HD icons
16.4 (2017-06-02)
- Improved compatibility with other formatter plugins
- Fixed unnecessary mixc.xml changes
16.3 (2017-04-03)
- Fixes incorrect parsing of import order from *.prefs
16.2 (2017-01-30)
- Update labels in settings dialog
16.1 (2017-01-10)
- Support for Workspace Mechanic configuration files (*.epf) (Java formatter only)
- hooking on IntelliJ API with dynamic proxies
16.0 (2016-09-07)
- disabled asserts
15.9 (2016-08-29)
- bundled formatters from Eclipse 4.6 - requires JDK 1.8
- Import order fix for inner classes
- bundled formatters from Eclipse 4.6
- support for installation location in a default plugins folder
15.8 (2016-07-16)
- Another import order fix
15.7 (2016-07-01)
- Import order fix
15.6 (2016-06-10)
- configuration enabled for default project
- external Eclipse location fix for IJ 13
- import order edge case fixed
15.5 (2016-05-06)
- upgraded C, Java formatter from Eclipse 4.5.2
- installed Eclipse (4.5+) can be chosen to format Java code
- added new import ordering implementation to match Eclipse 4.5.2
- fixed: editor tab changes to blue when there's no changes after format
- repacked and compressed jars to reduce size
- settings scrollbar fixed
15.4 (2016-01-25)
- upgraded C, Java formatter from Eclipse Mars (4.5.1) - requires JRE 1.7
- fixed settings form for new IJ 15, 16
15.3 (2015-11-19)
- upgraded Java formatter from Eclipse Mars SR1 (4.5.1) - requires JRE 1.7
15.2.x.2 (2015-08-13)
- IndexOutOfBoundsException fix
15.2 (2015-08-07)
- fixed cursor jumping after formatting
- probably fixed 'Attempt to modify PSI for non-committed Document!' after import optimizing
- disabled info notification popups
15.1 (2015-07-21)
- C/C++ support - requires to run IDE with JRE 1.7, matched for file types defined in: 'Settings | Editor | File Types' with 'C++' name
- better matching of JS file types
- upgraded Java formatter from Eclipse Mars 4.5 - requires JRE 1.7
- configurable use of the old Java formatter from Eclipse 4.4 - requires JRE 1.6
15.0 (2015-06-22)
- new IJ 15 API
14.9 (2015-06-15)
- fixed reformat for 'only VCS changed text'
14.8 (2015-01-29)
- fixed jsp import optimizing
14.7 (2014-12-02)
- exception fix for Android Studio
14.6 (2014-11-05)
- libs from Eclipse 4.4.1
- configurable formatting for Live Templates (default off)
14.5 (2014-10-22)
- fixed notifications settings for IJ 14
- import optimizing fix
- settings scroll pane added
14.4 (2014-09-12)
- Live templates formatting fix
14.3 (2014-09-11)
- StringIndexOutOfBoundsException when formatting during commit
14.2 (2014-07-16)
- java formatter from Eclipse 4.4 - supports Java 1.8
- language level used for formatting is loaded from project settings
14.1 (2014-04-08)
- persisting of project specific enabling/disabling of the formatter
14.0 (2014-03-31)
- project specific enabling/disabling of the formatter
13.0.1.1 (2014-01-15)
- error handling
4.1.0 (2013-11-24)
- Updated libs for Java formatting to Eclipse 4.3.1
4.0.0 (2013-11-22)
- Proper Import Optimizer integration, it is no longer true that IntelliJ's Import Optimizing must be turned off, quite the opposite.
- Hard-coded using of language level to 1.7 if configured lower in eclipse settings file, to be more user friendly.
3.9.0 (2013-11-21)
- IJ 13 API changes
3.8.1 (2013-10-17)
- better error messages.
3.8.0 (2013-10-15)
- format "Only VCS changed text" fixed
3.7.0 (2013-08-07)
- fix for custom static imports order
- settings validations
3.6.0 (2013-04-22)
- import order fix - issue #44
...
0.1 (2011-11-01)
- Initial release

General usage instructions