This plugin helps you to apply to a common code style in a team of Eclipse, IntelliJ and NetBeans IDE users. You can use several external code formatters inside the NetBeans IDE, depending on whatever your co-workers use. The original formatting engine of Eclipse, the Google Code Formatter, the Spring Java Formatter or any other are embedded and allow you to format the source code the same way as e.g. your co-workers do with their Eclipse IDE.
- Makes use of the internal NetBeans formatting API, which makes it possible to reuse built-in features like the format on save action or format only selected lines ... (since 1.13)
- Global configuration and project specific configuration
- Shows the used formatter in a notification (Disabled by default)
- Supports profiles for Eclipse formatter (since 1.6)
- Code templates for @formatter:on/off for Eclipse formatter (since 1.9)
- Supports Workspace Mechanic configuration file for Eclipse formatter (since 1.10)
- Support configuration from .settings/org.eclipse.jdt.core.prefs (absolute and relative paths) for Eclipse formatter (since 1.10)
- Support configuration of linefeed for Eclipse formatter (since 1.10)
- Support configuration of source level for Eclipse formatter (since 1.10)
- Support for macro invocation for Eclipse formatter (since 1.12)
- Support for guarded documents (documents that are created by the NetBeans GUI builder, guarded blocks are skipped of course, but everything in between can be formatted), only for Eclipse Java Code Formatter (since 1.13)
- Support for Google code formatter (since 1.13)
- Support for Spring Java formatter (since 1.14)
- Support for revelc.net XML formatter (since 1.14)
- Support for Jsoup XML formatter (since 1.14)
- Support for Jackson Json formatter (since 1.14)
- Updating the breakpoints after formatting acts not exactly the same way as for the internal NetBeans formatter, but it's pretty close.
- Guarded blocks are not supported for the Google Java Code Formatter. There seems to be a bug in the Google Java Code Formatter which prevents this feature to work. Further details on this bug can be watched here
Please note that this plugin only provides support for formatting. Eclipse users may miss the application of save-actions like "adding @Override annotations" or "member sort order". Such AST-based transformations are not provided by this plugin.
Licensed under the Eclipse Public License, Version 2.0
This plugin uses third-party libraries, which are needed to provide its functionality, please check their licenses here
For more information go to http://funfried.github.io/externalcodeformatter_for_netbeans/ or https://github.com/funfried/externalcodeformatter_for_netbeans
Provide defects, request for enhancements and feedback at https://github.com/funfried/externalcodeformatter_for_netbeans/issues