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.
The options set in 'Tools | Options | Java Code' panel seems to affect both standalone classes and anonymous inner classes. Sometimes this leads to strange indentation. Please refer to the following threads on nbuser mailing list: 1. http://www.netbeans.org/servlets/ReadMsg?list=nbusers&msgNo=102909 jonaqua wrote: I believe this is a bug in the auto-format stuff. When I run auto-format (alt-shift-f) on a completely separate file it messes up my anonymous action listeners: addButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addButtonClicked(); } }); Is changed to the following when I press Alt-Shift-F: addButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addButtonClicked(); } }); 2. http://www.netbeans.org/servlets/ReadMsg?list=nbusers&msgNo=98850
I also dislike the additional empty line - not sure if the best solution is to add more options, though.
More than the empty line, it is the extra tabs/spaces that is probably more annoying: http://www.netbeans.org/servlets/ReadMsg?list=nbusers&msgNo=102917 ...I just opened NetBeans 6 Beta 1 and it's 'continuation indent' is set to 8 yet it does not affect the anonymous inner classes.... Perhaps 'continuation indent' value should be ignored for anonymous inner classes.
*** Issue 137875 has been marked as a duplicate of this issue. ***
Will resolve later.
NetBeans.org Migration: changing resolution from LATER to WONTFIX