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 183995

Summary: Code formatting breaks 'if' statement if it contains the expression contains {}
Product: javafx Reporter: Alexandr Scherbatiy <sunflower>
Component: EditorAssignee: Anton Chechel <manowar>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 173487    

Description Alexandr Scherbatiy 2010-04-13 11:53:53 UTC
NetBeans-JavaFX-Soma: #219

  Product Version         = NetBeans IDE Dev (Build 201004120251) (#35dcf436d9c0)
  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:

- Format the code:
---------------------------------------------
function getWidth(): Number {
    if ({__PROFILE__} == "desktop") return 640 else return 1280
}
---------------------------------------------

The result is:
---------------------------------------------
function getWidth(): Number {
    if ({
                __PROFILE__
            } == "desktop") return 640
    else return 1280
}
---------------------------------------------
Comment 1 Anton Chechel 2010-04-23 13:08:14 UTC
fixed
http://hg.netbeans.org/javafx/rev/7d1f41c3e0dd
Comment 2 Alexandr Scherbatiy 2010-05-12 12:45:45 UTC
verified in netbeans-trunk-nightly-201005112200-javafx-full-windows.exe