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 268078 - Closing braces not being automatically inserted in Java
Summary: Closing braces not being automatically inserted in Java
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: UI (show other bugs)
Version: 8.1
Hardware: PC Windows 10 x64
: P3 normal (vote)
Assignee: issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-18 01:35 UTC by theosib
Modified: 2016-09-18 02:36 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 theosib 2016-09-18 01:35:30 UTC
I noticed that Netbeans was no longer automatically inserting closing braces.  For instance, when I type this:

public void mymethod() {

Normally, it would insert the closing brace, and when I would press return, it would indent for me automatically.  Now, neither of these happens properly.

I tried unchecking and the rechecking "Insert Closing Brackets Automatically", but that didn't fix it.  However, it will properly auto-insert other things like closing parentheses and brackets.
Comment 1 theosib 2016-09-18 01:52:47 UTC
Actually, I'm finding that this feature works correctly for some files and not for others.  I cannot tell what is different about the different files.
Comment 2 theosib 2016-09-18 02:20:27 UTC
Actually, there are some cases when it will auto-complete the braces.  For instance, if I start typing a try/catch block, it'll auto-insert the braces for the try but not the catch.
Comment 3 theosib 2016-09-18 02:36:20 UTC
I had a stray { in the last function in the file.  The problem cleared up when I deleted the brace.  I think that if there's a stray brace AFTER where I'm inserting code, that should not break brace auto-insertion.