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.
Product Version = NetBeans IDE 6.8 Beta (Build 200909281634) (#066b555e5ecf) Operating System = Windows XP version 5.1 running on x86 Java; VM; Vendor = 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02; Sun Microsystems Inc. Steps to reproduce: - Copy the code to the editor: -------------------------------------------------- var a = 3 on replace{ println(a); } -------------------------------------------------- - Format the code The result is: -------------------------------------------------- var a = 3 on replace{ println(a); } --------------------------------------------------
The same is for the class triggers. Format the code: ------------------------------------------------- class Foo { var x : Integer on replace = newV { println("x: =>{newV}={x}"); }; var y : Integer on replace { println("y: {y}"); }; var z : String = "Ralph" on replace { println("z: {z}"); }; } ------------------------------------------------- The result is: ------------------------------------------------- class Foo { var x : Integer on replace = newV { println("x: =>{newV}={x}"); }; var y : Integer on replace { println("y: {y}"); }; var z : String = "Ralph" on replace { println("z: {z}"); }; } -------------------------------------------------
Formatting it-self has been fixed: http://hg.netbeans.org/javafx/rev/87263c31d320 Formatting of block expression in the "on replace" clause depends on wrapping "Brace Placement" settings. If wrapping is incorrect, then it's another issue, not P2 for sure. Formatting settings are not implemented yet, but should be asap.
verified in Build 200911170201