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 235181 - Broken SHIFT+ALT+F autoindentation
Summary: Broken SHIFT+ALT+F autoindentation
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-28 14:47 UTC by unai
Modified: 2013-12-03 14:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description unai 2013-08-28 14:47:44 UTC
[ BUILD # : 201308222300 ]
[ JDK VERSION : <1.7.0_21 ]

Following sample code snippet reproduces the issue:

        function bogus($asd) {
            for ($i = 0; $i < $asd; $i++)
                if ($i == 3)//bla bla bla
                    return false; //bla bla
            return $i;
        }

Hitting SHIFT+ALT+F you get

        function bogus($asd) {
            for ($i = 0; $i < $asd; $i++)
                if ($i == 3)//bla bla bla
                    return false; //bla bla
                    return $i;
        }

which is wrong.
On the other hand, if you remove the last comment and invoke autoindetation
again, indentation is applied properly:

        function bogus($asd) {
            for ($i = 0; $i < $asd; $i++)
                if ($i == 3)//bla bla bla
                    return false;
            return $i;
        }
Comment 1 mmolda 2013-08-28 14:52:38 UTC
Reproducible in

Product Version: NetBeans IDE Dev (Build 201308280001)
Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b55
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b40
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 2 Ondrej Brejla 2013-12-03 14:33:26 UTC
Fixed in web-main #08fe3bb7060e