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.
[ 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; }
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)
Fixed in web-main #08fe3bb7060e