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 - Incorrect indentation for opening brace
Summary: Incorrect indentation for opening brace
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
: 192056 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-11-16 19:55 UTC by ccsheng
Modified: 2010-12-20 16:28 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

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