Eclipse Java Code Formatter in NetBeans Plugin Manager

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:

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! 

Comments:

Using it all the time, works great!

Posted by Jan on October 31, 2013 at 08:47 AM PDT #

Hi,

The plugin is mostly working but I have two issues:

1. In the Source menu I see two items "Format with Eclipse Formatter" and "Format". I thought the idea was once set up and enabled, the regular format would just use the Eclipse formatter. But in practice the regular "Format" seems to use its own rules different from "Format with Eclipse Formatter" . Is this as expected or am I doing something wrong?

2. "Format With Eclipse Formatter" always reformats the whole file even if I have selected some text and want just that part formatted. Again is this expected behavior or something only I am getting.

Thanks for the great work.

Posted by guest on March 27, 2014 at 07:49 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today