fredag 12 mars 2010

Hide boilerplate in netbeans

Im using the Netbeans 6.9m1, while looking for the code coverage plugin, i found something called "extended java editor" I added it without thinking and planed to look what it is later.
Then going back to my editorwindow this is what i found:

To make it more visible what it does here is a before image:

In other words,

  • it hides the Bundle lookups and instead shows the text in my bundle file.
  • hides the type on the right side of collections (new ArrayList<~>())
  • shows inner classes as closures
And this without changing any code. 
I think this makes the code allot easier to read. and it hilights other things that should be changed. For example i dont think ServerRootNode.getDefaultInstance().getConnection().addPropertyChangeListener...
looks that bad in the before picture. but in the after picture it looks horrible. 

There might be more things this plugin does that i haven't seen yet, i tried to find more information about it but there doesn't seem to be much.