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 192363 - [70cat][code completion] Adding an open parenthesis always adds a closing parenthesis, even when not needed.
Summary: [70cat][code completion] Adding an open parenthesis always adds a closing par...
Status: RESOLVED WORKSFORME
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-23 18:46 UTC by esmithbss
Modified: 2010-11-24 12:11 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 esmithbss 2010-11-23 18:46:19 UTC
Product Version = NetBeans IDE Dev (Build 201011230001)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.6.0_20
Runtime = Java HotSpot(TM) Client VM 16.3-b01

When editing a Java source file and the parenthesis for a statement are not balanced, it is common for a person to add a single parenthesis; however, when an opening parenthesis is added, either as a new character or as a selected block replacement, both the opening and closing parentheses are added which requires the closing parenthesis to be deleted.

When adding parenthesis to a statement, if the parenthesis are unbalanced and the parenthesis being added (open or closed) will bring the parentheses closer to being in-balance, then the counter parenthesis (open or closed) should not be added.
Comment 1 Dusan Balek 2010-11-24 12:11:07 UTC
Unfortunately, I cannot reproduce the problem in the current dev build. Could
you please provide some additional information (particular test case, any
non-default formatting options, etc.) that could help me to reproduce the
issue? Thanks.