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.
Please try in JS file try { } catch (e) { } finally { } and set formatting for try/catch/finally to "New Line Indented". After formatting the code, the result is try { } catch (e) { } finally { } while I think it should be (as in PHP) try { } catch (e) { } finally { } Thank you Product Version: NetBeans IDE Dev (Build web-main-1841-on-20150127) Java: 1.8.0_25; Java HotSpot(TM) Client VM 25.25-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b17 System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)
Similar use case: - set formatting for try/catch to Same line - try to format try { console.log(1); } catch (e) { console.log(1); } finally { console.log(1); } => nothing happens. In PHP the catch and finally are moved to single line with preceding }
Fixed in web-main together with #250038: 266facf3ed31
Integrated into 'main-silver', will be available in build *201503260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/266facf3ed31 User: Roman Svitanic <rsvitanic@netbeans.org> Log: #250038 and #250039: Alignment options for new line before else/while/catch/finally keywords Task #250038 - If-else on same line does not remove new line
Thank you, verified Product Version: NetBeans IDE Dev (Build 201503300001) Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Linux version 3.13.0-45-generic running on amd64; UTF-8; en_US (nb)