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.
When using code completion to complete "Runnable r = new Runnabl", I get the following result with my formatting options: Runnable r = new Runnable() { public void run() { throw new UnsupportedOperationException("Not supported yet."); } } There are two things that are wrong with the result: 1) The opening brace after "new Runnable()" should be on the next line, as I have "Braces Placement" set to "New Line" for "Class Declaration" in the Formatting options. (!nd also for "Other" in case that matters--which I don't think it should.) 2) There should be no blank line before the run() method implementation, as I have "Blank Lines" set to 0 for "After Class Header" in the Formatting options. The "Before Method" setting should not be applied at the beginning of a class body (see issue 110176). In general, the generated code should have the same formatting as Source -> Format would produce. With the example above, this would be: Runnable = new Runnable() { public void run() { throw new UnsupportedOperationException("Not supported yet."); } } Product Version: NetBeans IDE 6.0 (Build 200711261600) Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
This is partially fixed in 6.1, the only thing which has to by fixed is position of opening '{' when the code is generated. After reformat it moved to correct position. -> this is IMO only a minor complication -> P4
Overtake.
Reassigning all moonko's java/source bugs to myself.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss