This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Under Tools -> Options -> Java Code -> Formatting -> Alignment and Braces -> Braces Placement, provide additional options for empty pairs of braces. For example I'd like to have empty classes/methods to be formatted like class X { } void f() { } not like class X { } void f() { } as they currently do with my settings.
I'd also like separate options for the braces. Currently it's got Class Declaration, Method Declaration and Other. Other includes all the if/else etc as well as array initializers and all the other things. I want most of them on, however when I have a [][], it gets really messy with new lines all over the place. For example it gets formatted like this: cssLinks = new String[][] { { "screen, projection, print", PageParts.siteContext + "CSS/coreFonts.css" }, { "screen, projection, print", PageParts.siteContext + "CSS/login.css" }, { "screen, projection, print", PageParts.siteContext + "CSS/adminFonts.css" }, { "screen, projection, print", PageParts.siteContext + "CSS/adminStyle.css" }, { "screen, projection, print", PageParts.siteContext + "CSS/menu.css" }, { "screen, projection, print", PageParts.siteContext + "CSS/buttons.css" }, { "screen, projection, print", PageParts.siteContext + "CSS/ShoppingBasket.css" } }; And I want it to stay like this cssLinks = new String[][] { {"screen, projection, print", PageParts.siteContext + "CSS/coreFonts.css"}, {"screen, projection, print", PageParts.siteContext + "CSS/login.css"}, {"screen, projection, print", PageParts.siteContext + "CSS/adminFonts.css"}, {"screen, projection, print", PageParts.siteContext + "CSS/adminStyle.css"}, {"screen, projection, print", PageParts.siteContext + "CSS/menu.css"}, {"screen, projection, print", PageParts.siteContext + "CSS/buttons.css"}, {"screen, projection, print", PageParts.siteContext + "CSS/ShoppingBasket.css"} }; Currently the only way to do that is to set the Other option in "Braces Placement" to be "Same Line", which does this to the rest of my code: try { if() { else { catch(Exception e) { }finally { Which I don't like, and I can't mix the 2 at the moment. Other should be expanded as much as possible into as many different options as you can
Overtake.