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.
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 ").
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?
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 ***