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.

Bug 192357 - Source code formatting is incorrect with anonymous inner classes
Summary: Source code formatting is incorrect with anonymous inner classes
Status: RESOLVED DUPLICATE of bug 191786
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.0
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-23 17:45 UTC by krissco
Modified: 2010-11-24 09:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Options Export of Editor Options (20.77 KB, application/x-zip-compressed)
2010-11-23 17:45 UTC, krissco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description krissco 2010-11-23 17:45:56 UTC
Created attachment 103256 [details]
Options Export of Editor Options

Product Version: NetBeans IDE 7.0 Beta (Build 201011152355)
Java: 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\Documents and Settings\kjs.DBADMIN\.netbeans\7.0beta

I'm noticing something strange with the Source/Format action when dealing with anonymous inner classes.

I use the "brace on new line" formatting option:
MyClass = new SuperClass() 
{
   @Override
   protected void overriddenMethod()
   {
     . . .
   }
};


The format action is placing an additional new line between the first brace and the assignment. 

When I change to "brace on same line", the first brace is indented by an additional space each time I format.

I've attached my editor options.
Comment 1 Dusan Balek 2010-11-24 09:39:53 UTC
Already fixed in the current dev build.

*** This bug has been marked as a duplicate of bug 191786 ***