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 172116

Summary: Comments are incorrectly indented after opening curly brace
Product: php Reporter: jlindenbaum <jlindenbaum>
Component: Formatting & IndentationAssignee: Tomasz Slota <tslota>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Expected commenting after new braces
Incorrect commenting after CTRL/ALT SHIFT F operation

Description jlindenbaum 2009-09-13 21:39:55 UTC
Tested on XP SP 3 Nebteans 6.7 and 6.7.1. OS X 10.5.5 / 10.5.6 NetBeans 6.7 and 6.7.1.

When a comment is the first item after an opening curly brace, it isn't indented, but rather put on the same level.

Images should be attached.

Text example:

	public function netBeansBug()
	{
		// comment
		if ($condition === TRUE)
		{
			// another comment
		}
		elseif ($condition === TRUE)
		{
			// another comment
		}
	}

Above is correct, below is after CTRL+SHIFT+F (Mac) ALT+SHIFT+F (Windows)

	public function netBeansBug()
	{
	// comment
		if ($condition === TRUE)
		{
		// another comment
		}
		elseif ($condition === TRUE)
		{
		// another comment
		}
	}
Comment 1 jlindenbaum 2009-09-13 21:40:30 UTC
Created attachment 87568 [details]
Expected commenting after new braces
Comment 2 jlindenbaum 2009-09-13 21:41:16 UTC
Created attachment 87569 [details]
Incorrect commenting after CTRL/ALT SHIFT F operation
Comment 3 Tomasz Slota 2009-09-14 10:44:17 UTC
it works fine now

*** This issue has been marked as a duplicate of 162320 ***