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 245667 - Completion doesn't give options to generate constructors
Summary: Completion doesn't give options to generate constructors
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 8.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
: 247282 253330 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-07-15 01:44 UTC by iluvtr
Modified: 2015-07-07 15:28 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Image of bug (298.79 KB, image/png)
2014-07-15 01:44 UTC, iluvtr
Details
Image of bug (182.99 KB, image/jpeg)
2014-09-12 16:39 UTC, iluvtr
Details
As you can see in this image it doesn't work with final variables (193.15 KB, image/jpeg)
2014-09-12 16:40 UTC, iluvtr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description iluvtr 2014-07-15 01:44:07 UTC
Created attachment 148050 [details]
Image of bug

As you can see in the image the completion of NB 8.0 offering generate constructors doesn't give the same quality of options like NB 7.2. That feature of generating constructors is really powerful: Why is missing in NB 8.0? Indeed a bug.
Comment 1 Dusan Balek 2014-07-17 11:07:30 UTC
Already fixed in the current dev build.
Comment 2 iluvtr 2014-09-12 12:24:21 UTC
It's not fixed, this problem stills in NB 8.0.1
Comment 3 Dusan Balek 2014-09-12 13:34:19 UTC
Strange. I've just tested a clean installation of NB 8.0.1 and it works for me well. Do you still have the same test case with a class extending RuntimeException?
Comment 4 iluvtr 2014-09-12 16:39:56 UTC
Created attachment 149178 [details]
Image of bug
Comment 5 iluvtr 2014-09-12 16:40:30 UTC
Created attachment 149179 [details]
As you can see in this image it doesn't work with final variables
Comment 6 Dusan Balek 2014-09-15 10:09:34 UTC
I see. Thanks.

Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/ea17b8fac3d1
Comment 7 Jiri Prox 2014-09-19 07:36:28 UTC
*** Bug 247282 has been marked as a duplicate of this bug. ***
Comment 8 Quality Engineering 2014-09-19 15:52:04 UTC
Integrated into 'main-silver', will be available in build *201409191429* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ea17b8fac3d1
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #245667: Completion doesn't give options to generate constructors - fixed.
Comment 9 brettryan 2014-12-16 12:13:30 UTC
Did this make it to 8.0.2 because 8.0.2 still has this issue with final variables.

Note the following conditions:

    // Provides only WidgetController()
    public class WidgetService {
        final WidgetService ws;
    }
    // Provides WidgetController(WidgetService)
    public class WidgetService {
        WidgetService ws;
    }
    // Provides WidgetController(WidgetService, FooService)
    public class WidgetService {
        final WidgetService ws;
        FooService fs;
    }

As you can see it will work where at least one member is not final, but in the case where all are final then it will not show the constructor generation.
Comment 10 Jiri Prox 2014-12-16 12:16:50 UTC
unfortunately not, this is fixed only in current dev build, so it will be included in the next release
Comment 11 Jiri Prox 2015-07-07 15:28:20 UTC
*** Bug 253330 has been marked as a duplicate of this bug. ***