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.
I want to have spaces inside the sequence initialization brackets just like around braces, e.g. def y = [ foo, bar ]; When I formatted my file I ended up with def y = [foo, bar]; I discovered that this is controlled by a formatting option, under Spaces -- "Sequence Init Brackets". So I changed it from false to true, but that had one huge problem: Now I get spaces everywhere I have a "[]", such as in type initializations: function bar(bar: Bar[]): Void { var foo: Foo[]; gets formatted as function bar(bar: Bar[ ]): Void { var foo: Foo[ ];
fixed http://hg.netbeans.org/javafx/rev/0e3131f48660
The issue is still reproduced in build netbeans-trunk-nightly-201005170932-javafx-windows.exe - Select the Spaces -> "Sequence Init Brackets" option - Format the code ------------------------------------------------ class Bar {} class Foo {} function bar(bar: Bar[]): Void { var foo: Foo[]; } ------------------------------------------------ The result is: ------------------------------------------------ function bar(bar: Bar[ ]): Void { var foo: Foo[ ]; } ------------------------------------------------
Yes, this still happens in my files too.
fixed http://hg.netbeans.org/javafx/rev/99cdedefe47e
verified in netbeans-trunk-nightly-201005260001-javafx-windows.exe