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.
Steps to reproduce: - Copy the code to the editor: -------------------------------------------------- Stage { scene: Scene { content: [ Ellipse { fill: Color.GREEN }, Circle{ fill: Color.GREEN }, Rectangle{ fill: Color.GREEN } ] } } -------------------------------------------------- - Format the code The last curly brackets are shifted to the right -------------------------------------------------- Stage { scene: Scene { content: [ Ellipse { fill: Color.GREEN }, // <- Shifted bracket Circle { fill: Color.GREEN }, // <- Shifted bracket Rectangle { fill: Color.GREEN } // <- Shifted bracket ] } // <- Shifted bracket } // <- Shifted bracket --------------------------------------------------
Product Version = NetBeans IDE Dev (Build 200911091156) (#fa9887b26708) 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.
*** This bug has been marked as a duplicate of bug 175655 ***
Alexander, I am sorry for myself, but I would expect formatting works correctly here, original code is incorrectly formatted IMHO - or at least this might be on person opinion (settings) how the brackets should be positioned. IMHO -> P4 in worst case
Let's use the official documents. http://java.sun.com/javafx/1/tutorials/ui/syntax/index.html According to the tutorial this one is correct: -------------------------------------------------------- import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.shape.Rectangle; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; Stage { title: "Declaring Is Easy!" scene: Scene { width: 300 height: 250 content: [ Circle { centerX: 150 centerY: 120 radius: 80 fill: Color.MAROON stroke: Color.INDIANRED strokeWidth: 10.0 }, //Circle Rectangle { x: 25, y: 80 width: 250, height: 80 arcWidth: 20 arcHeight: 20 fill: Color.web("#6699ff") stroke: Color.web("#003399") strokeWidth: 5.0 } //Rectangle ] //Content } //Scene } //Stage -------------------------------------------------------- Anyway the default indentation in the object literals for the code formatting should be described in the code formatting specification.
verified in Build 200911160201