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 - Comments are incorrectly indented after opening curly brace
Summary: Comments are incorrectly indented after opening curly brace
Status: RESOLVED DUPLICATE of bug 162320
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomasz Slota
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-13 21:39 UTC by jlindenbaum
Modified: 2009-09-14 10:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Expected commenting after new braces (17.75 KB, image/png)
2009-09-13 21:40 UTC, jlindenbaum
Details
Incorrect commenting after CTRL/ALT SHIFT F operation (17.69 KB, image/png)
2009-09-13 21:41 UTC, jlindenbaum
Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***