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 51194 - Bracket autocompletion misbehaviour
Summary: Bracket autocompletion misbehaviour
Status: RESOLVED DUPLICATE of bug 50006
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-05 10:59 UTC by Jan Lahoda
Modified: 2007-11-05 13:44 UTC (History)
1 user (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 Jan Lahoda 2004-11-05 10:59:33 UTC
Build 200410311900, JDK1.4.2_05.

1. Start the IDE with a clean userdir.
2. Create a brand new J2SE Project with main method.
3. Insert an empty line into the main method
(after the TODO) and try to type the following on it:
a) "(another " is inserted automatically, ok),
<delete> (should delete the auto-inserted "), type
another ": one more " is added automatically,
which is bad I think (after manual addition of ",
the " are balanced, so nothing should be added).
b) (on an empty line) ( [closing ) is inserted
automatically, ok], <delete> [should delete the
auto-inserted )], type ( [closing ) is inserted,
ok], type ): the caret is simply moved behind the
closing bracket (no bracket added), so the result
is "(()|" (| is the caret), which is bad I think.

Although these examples are artifical, the same
problems occur also during common editing
operations (for example surrounding a text by ").
Comment 1 Martin Roskanin 2004-11-05 16:39:18 UTC
a) is duplicate of issue #50006
b) a balance of parenthesis is checked, that's why closing parenthesis
is not written and caret is simply moved forward. What dou you expect?
Comment 2 Jan Lahoda 2004-11-05 16:55:48 UTC
a) Ok, thanks
b) I would expect that the result is "(()|)", but after thinking about
it a little bit more it does not seem as a good idea (for example if
the text is "(something(|), something", inserting a closing bracket
would be quite annoying), so please ignore this point.

Marking as duplicate of issue #50006.


*** This issue has been marked as a duplicate of 50006 ***