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 192033

Summary: Incorrect indentation for opening brace
Product: editor Reporter: ccsheng <ccsheng>
Component: Formatting & IndentationAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: normal CC: chrysophylax, tjahnsen
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description ccsheng 2010-11-16 19:55:16 UTC
Consider the following line:
if (true)

After pressing ENTER the cursor is indented in the next line (| = cursor location):
if (true)
    |

Now if I type an opening brace { the code becomes:
if (true)
    {
    |
}

I believe the editor used to put the opening brace at the same level as the closing brace, like:
if (true)
{
    |
}

This problem started happening after installing recent auto updates.

Product Version = NetBeans IDE 6.9 (Build 201011082200)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.6.0_10
Runtime = Java HotSpot(TM) Client VM 11.0-b15
Comment 1 Dusan Balek 2010-11-18 08:02:40 UTC
*** Bug 192056 has been marked as a duplicate of this bug. ***
Comment 2 Dusan Balek 2010-11-18 10:42:49 UTC
Unfortunately, I cannot reproduce the issue in the current dev build. Could you please attach the messages.log file to this issue? Thanks.
Comment 3 Dusan Balek 2010-11-18 14:05:17 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/8f18410ba01c
Comment 4 ccsheng 2010-12-20 16:28:16 UTC
I have verified that this is fixed with 6.9 Patch 3. Thanks.