Eclipse Java Code Formatter in NetBeans Plugin Manager
By Geertjan on Oct 31, 2013
Great news for Eclipse refugees everywhere. Benno Markiewicz forked the Eclipse formatter plugin that I blogged about sometime ago (here and here)... and he fixed many bugs, while also adding new features. It's a handy plugin when you're (a) switching from Eclipse to NetBeans and want to continue using your old formatting rules and (b) working in a polyglot IDE team, i.e., now the formatting rules defined in Eclipse can be imported into NetBeans IDE and everyone will happily be able to conform to the same set of formatting standards.
And now you can get it directly from Tools | Plugins in NetBeans IDE 7.4:
News from Benno on the plugin, received from him today:
- The plugin is verified by the NetBeans community and available in the Plugin Manager in NetBeans IDE 7.4 (as shown above) and also at the NetBeans Plugin Portal here, where you can also read quite some info about the plugin: http://plugins.netbeans.org/plugin/50877/eclipse-code-formatter-for-java
- The issue with empty undo buffer was solved with the help of junichi11:
- The issue with the lost breakpoints remains unsolved and there was no further
feedback. That is the main reason why the save action isn't activated by default.
- See also the open known issues at https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues?state=open
Features are as follows:
- Global configuration and project specific configuration.
- On save action, which is disabled by default.
- Show the used formatter as a notification, which is enabled by default.
Finally, Benno testifies to the usefulness, stability, and reliability of the plugin:
I use the Eclipse formatter provided by this plugin every day at work. Before I commit, I format the sources. It works and that's it. I am pleased with it.
Here's where the Eclipse formatter is defined globally in Tools | Options:
And here is per-project configuration, i.e., use the Project Properties dialog of any project to override the global settings:
Interested to hear from anyone who tries the plugin and has any feedback of any kind!