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.
If a comment is on the first line of a block of instructions, the Source | Format function behaves incorrectly. Consider the following example: <?php $x = 0; if($x==1) { // the first comment $x = 2; // the second comment $x = 3; } function test($y) { // another comment return $y; } ?> After using the Source | Format function, it gets reformatted as: <?php $x = 0; if($x==1) { // the first comment $x = 2; // the second comment $x = 3; } function test($y) { // another comment return $y; } ?> The first comment should get indented as the rest of the body of a function or a block of code. Also, the Source | Format function works for some reason WAY slower than just pressing ALT+SHIFT+F in the editor. I'm using Netbeans 6.7 RC1.
*** This issue has been marked as a duplicate of 162320 ***