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 249599 - Negative "Insert Closing Brackets Automatically" ignored when editing Groovy classes.
Summary: Negative "Insert Closing Brackets Automatically" ignored when editing Groovy ...
Status: VERIFIED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: bruno.flavio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-02 06:39 UTC by apr-apr-apr
Modified: 2015-03-08 18:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch to check if "Matching Brackets" setting is enabled prior to addition. (2.62 KB, patch)
2015-02-16 23:30 UTC, bruno.flavio
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description apr-apr-apr 2015-01-02 06:39:13 UTC
When editing a Groovy class, even if the option Tools > Options > Editor > "Insert Closing Brackets Automatically" is unchecked for "All Languages", closing brackets are still automatically inserted.

(Other things deceptively controlled by this option are also closed automatically, quotes and parentheses for example.)

To replicate in Netbeans 8.02 (Ubuntu Intel 64 bit):
0. Turn off "Insert Closing Brackets Automatically" for "All Languages".
1. Create a new project, using the category JavaFX and the project type JavaFXApplication.
2. Humour yourself and go back and confirm that "Insert Closing Brackets Automatically" is still off.
3. Create a new Groovy class in your new project.
4. Attempt to create a method called void myMethod().  As soon as you type the opening parenthesis, the closing one will be inserted automatically.
Comment 1 bruno.flavio 2015-02-15 19:01:56 UTC
I've checked the test case described and found it accurate.

When the option "Insert Closing Brackets Automatically" the behaviour remains the same (for quotes, double-quotes, parenthesis, and brackets '[]'). The braces '{}' work as expected.
Comment 2 bruno.flavio 2015-02-16 23:30:41 UTC
Created attachment 152018 [details]
Patch to check if "Matching Brackets" setting is enabled prior to addition.

Fix proposal. Tested with groovy classes for the following characters: ' " ( [ {
Comment 3 Jiri Kovalsky 2015-03-05 09:19:19 UTC
Patch reviewed and approved by Martin Janicek and integrated by Jiri Kovalsky on behalf of Bruno Flavio. Please verify the fix in the next development build.

http://hg.netbeans.org/core-main/rev/23ab218123b4

Thanks a lot for your contribution Bruno!
Comment 4 Quality Engineering 2015-03-07 08:41:01 UTC
Integrated into 'main-silver', will be available in build *201503070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/23ab218123b4
User: Jiri Kovalsky <jkovalsky@netbeans.org>
Log: Check if Matching Brackets setting is enabled prior to addition. Patching issue #249599 on behalf of Bruno Fl
Comment 5 bruno.flavio 2015-03-08 18:43:04 UTC
Correct behaviour verified with build "2015-03-08_00-01-28".