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 197468 - Cannot enter closing curly braces (Java editor)
Summary: Cannot enter closing curly braces (Java editor)
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: PC All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-06 04:38 UTC by richwilsonaus
Modified: 2011-05-19 23:23 UTC (History)
0 users

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 richwilsonaus 2011-04-06 04:38:57 UTC
After entering the following code snippet, it's not possible to type a closing curly brace on the line after test();

  public Test() {
    if (a) {
      test();

  }
  
The editor simply moves the cursor to the start of the line.

The only way to work around it is to type a different character first, then cursor back and delete it.
Comment 1 Dusan Balek 2011-04-15 07:26:34 UTC
Unfortunately, I cannot reproduce the issue in the current dev build. Could you please provide any additional hints (like a non default formatting options, etc.) to help me reproduce the problem? Thanks.
Comment 2 richwilsonaus 2011-04-16 01:26:07 UTC
ok, A lot of the formatting is non-standard (Sun formatting guidlines), but that's the way I like it.

Tabs and Indents
----------------
Expand Tabs to Spaces, 2 Spaces per Indent, Tab Size 2, Right Margin 100, Continuation Indent Size 2, Label Indentation 0, No Absolute Label indentation, Indent Top-level class members, Indent case statements in switch, Add leading star in comment.

Alignment
---------
New lines on else, nothing else checked.

Braces
------
All on Same Line, Special "else if" treatment, Eliminate braces on all but "do..while" which is Generate.

Wrapping
--------
Never on all, except "Always" on For Statement, If Statement, While Statement, Do ... While Statement and Annotations.

Blank Lines
-----------
All 1 except Before Package, After Class, Before Field, After Field and After method which are 0.

Spaces
------
Before Keywords: while, else, catch, finally all checked.
Before Parentheses: if, for, while, catch, switch, synchronized all checked.
Around Operators: Binary, Ternary, Assignment checked.
Before Left Braces: All checked.
Within Parentheses: Only Braces checked.
Other: After Comma, After Semicolon, Before Colon, After Colon all checked.
Comment 3 Dusan Balek 2011-04-19 14:38:48 UTC
Unfortunately, I still cannot reproduce the issue. Could you please try to reproduce the issue using NB 7.0 RC2 or current dev build? Java indentation has been rewritten to use the new indentation API after NB 6.9.1 so it seems the bug is (hopefully) fixed now.
Comment 4 richwilsonaus 2011-05-19 23:23:45 UTC
Yes, I can confirm it's been fixed in NB 7.0 RC2.