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 227781 - Javascript Format results in "}elseif{"
Summary: Javascript Format results in "}elseif{"
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.3
Hardware: PC All
: P3 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
: 228919 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-03-21 15:57 UTC by dantonepinto
Modified: 2013-05-09 13:53 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Log do IDE (269.44 KB, text/plain)
2013-03-21 15:57 UTC, dantonepinto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dantonepinto 2013-03-21 15:57:19 UTC
When the "else" is set to stay glued to the "{".
Javascript Format results in "}elseif{"

Product Version = NetBeans IDE 7.3 (Build 201302132200)
Operating System = Windows NT (unknown) version 6.2 running on amd64
Java; VM; Vendor = 1.7.0_04
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.0-b21
Comment 1 dantonepinto 2013-03-21 15:57:28 UTC
Created attachment 132914 [details]
Log do IDE
Comment 2 Vladimir Riha 2013-03-24 18:49:08 UTC
Reproducible, sample code:


if (true) {

}else if(false){

}

becomes 


if (true) {

}elseif (false) {

}

if you select no whitespace before "else" and "left braces for ELSE"


Product Version: NetBeans IDE Dev (Build 201303232300)
Java: 1.7.0_10-ea; Java HotSpot(TM) Client VM 23.6-b03
Runtime: Java(TM) SE Runtime Environment 1.7.0_10-ea-b09
System: Linux version 3.5.0-26-generic running on i386; UTF-8; en_US (nb)
Comment 3 Petr Hejl 2013-04-24 06:29:37 UTC
*** Bug 228919 has been marked as a duplicate of this bug. ***
Comment 4 Petr Hejl 2013-04-24 09:32:04 UTC
Fixed in web-main 5714f64a71e3 and javaee7 9b8e2fc28889.
Comment 5 Quality Engineering 2013-04-25 02:18:14 UTC
Integrated into 'main-golden', will be available in build *201304242301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/5714f64a71e3
User: Petr Hejl <phejl@netbeans.org>
Log: #227781 - Javascript Format results in "}elseif{"
Comment 6 Vladimir Riha 2013-04-25 07:53:04 UTC
Verified

Product Version: NetBeans IDE Dev (Build 201304242301)
Java: 1.7.0_21; Java HotSpot(TM) Client VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Linux version 3.2.0-40-generic-pae running on i386; UTF-8; en_US (nb)
Comment 7 Quality Engineering 2013-04-26 02:45:21 UTC
Integrated into 'main-golden', will be available in build *201304252301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/9b8e2fc28889
User: Petr Hejl <phejl@netbeans.org>
Log: #227781 - Javascript Format results in "}elseif{"
Comment 8 Marian Mirilovic 2013-05-03 11:14:30 UTC
So, where exactly is this issue fixed ? Is it already in release73 repository ?
If so, please change SW to '73patch2-fixed',
If not, please backport the fix into release73 ASAP 

Thanks in advance.
Comment 9 Vladimir Riha 2013-05-09 13:53:50 UTC
patch2 verified

Product Version: NetBeans IDE 7.3.1 (Build 201302132200)
Java: 1.7.0_21; Java HotSpot(TM) Client VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Linux version 3.2.0-41-generic-pae running on i386; UTF-8; en_US (nb)