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 192043 - Formatting of braces is broken when editing Java code[after update to 6.9.2]
Summary: Formatting of braces is broken when editing Java code[after update to 6.9.2]
Status: CLOSED DUPLICATE of bug 192098
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: All All
: P1 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-17 08:54 UTC by yrozijn
Modified: 2010-11-29 11:46 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 yrozijn 2010-11-17 08:54:04 UTC
Product Version = NetBeans IDE 6.9.1 (Build 201011082200)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.6.0_22
Runtime = Java HotSpot(TM) Client VM 17.1-b03

After updating today, the formatting of braces is broken in Java code. I like to have my brace start at the next line, but suddenly the opening brace appears at an extra indentation.
For example:
I type
if(condition) [enter]
the cursor is on the next line, indented (still ok).
I type an opening brace { and hit enter, the brace remains indented (wrong). The closing brace appears at the correct indentation (i.e. the same level as the "if").

I consider this a P1 priority as it renders the IDE essentially useless and makes me seriously consider switching to something else if it isn't fixed very very soon.
Comment 1 gregkotsaftis 2010-11-18 13:52:35 UTC
I can verify this as well. It happens when I press enter and then type the brace:

example1 (works ok):
        if(true){<PRESS ENTER>
            
        }

example2 (works faulty):
        if(true)<PRESS ENTER>
            {
            
        }

I have to say as well that this is VERY frustrating and is slowing my coding at about a 40% rate.
Comment 2 yrozijn 2010-11-18 15:35:13 UTC
I found a workaround:
On Windows 7, go to C:\Users\<username>\.netbeans\6.9 and delete all files and folders with the date/time of when the update happened.
On other OS-es, I suppose a similar workaround is possible.
Comment 3 Dusan Balek 2010-11-19 12:20:51 UTC
Already fixed.

*** This bug has been marked as a duplicate of bug 192098 ***
Comment 4 Marian Mirilovic 2010-11-29 11:46:50 UTC
we will fix oroginal bug report into patch 3