How to Source Format multiple files in NetBeans Software & Sites 31 JUL 2013

The Alt+Shift+F or Source->Format option is one of my favourite functions in the NetBeans IDE, because it immediately makes my tangled spaghetti page of variables and logic look like a beautifully crafted and carefully laid out piece of code.

Prior to NetBeans 7.2 the Format option would only be available if you had focus on a code editor window and thus would be applied to that particular file that you were currently bashing away at. However, NetBeans 7.2 brought with it an awesome little tweak: you can now mass source format multiple files simply by selecting a file group or folder in the Projects node, Source Packages node, or Folders node window.

Having selected your targeted group and then hitting the Source->Format menu option, all files will be formatted using the source format rules currently set up under Options.

Nifty little time saver!

netbeans ide screenshot

Related Link:

Related Posts:

About Craig Lotter

South African software architect and developer at Touchwork. Husband to a cupcake baker and father to two little girls. I don't have time for myself any more.