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 247085 - Automatically inserted closing parenthesis is not honored when typing it in SQL editor
Summary: Automatically inserted closing parenthesis is not honored when typing it in S...
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 8.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: matthias42
URL:
Keywords: PATCH_AVAILABLE
Depends on:
Blocks:
 
Reported: 2014-09-12 21:01 UTC by olehoppe
Modified: 2015-02-02 02:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed patch v1 (20.92 KB, patch)
2014-12-07 18:45 UTC, matthias42
Details | Diff
proposed patch v2 (20.69 KB, patch)
2014-12-07 18:54 UTC, matthias42
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description olehoppe 2014-09-12 21:01:39 UTC
Product Version = NetBeans IDE 8.0.1 (Build 201408251540)
Operating System = Linux version 3.11.10-21-desktop running on amd64
Java; VM; Vendor = 1.7.0_51
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.51-b03

If the option Tools/Options/Editor/Code Completion/Insert Closing Brackets Automatically is enabled, when editing an SQL statement in SQL editor window and typing an opening parenthesis, the closing parenthesis is also inserted just after the caret, as it should be. But when continuing to type and completing the contents of the pair of parentheses, when typing the closing parenthesis the caret should just move behind the automatically inserted one instead of adding a new one. At least that's how it works nicely e.g. in Java editor.
Comment 1 matthias42 2014-12-07 18:45:01 UTC
Created attachment 150942 [details]
proposed patch v1

The attached patch fixes the problem and adds a unittest, that verifies the behaviour.
Comment 2 matthias42 2014-12-07 18:54:18 UTC
Created attachment 150943 [details]
proposed patch v2
Comment 3 matthias42 2015-02-01 11:06:30 UTC
The fix was committed as:

http://hg.netbeans.org/core-main/rev/970f61ad6a5d

Together with further bugs (completion with multiple statements did not work correctly). Also this bug was fixed. To ensure stability unittests were added.

While the unittests give a good guard, manual testing should be done to ensure the correct behavior. In the next few days a nightly build will be done, which includes this fix. When this happens, a message will be appended to this bug.

Please check that version - if you find the issue fixed, please change the status of this bug to "VERIFIED". Thank you!
Comment 4 Quality Engineering 2015-02-02 02:44:45 UTC
Integrated into 'main-silver', will be available in build *201502020002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/970f61ad6a5d
User: Matthias Blaesing <matthias42@netbeans.org>
Log: #247085: Fix/Unittest for brace/quote completion in SQL files.