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 197730 - Add parameters of superclass's constructor when offering constructor generation
Summary: Add parameters of superclass's constructor when offering constructor generation
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-14 08:01 UTC by Miloslav Metelka
Modified: 2014-03-10 08:38 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 Miloslav Metelka 2011-04-14 08:01:55 UTC
When class A has no non-arg constructor e.g.

class A {

  A(int i) {
    ...
  }

}

and class B extends it then when having this ('|' denotes caret)

class B extends A {

  B|

}

pressing Ctrl+Space offers to generate "B()" only. Of course the B() could guess parameter's value to superclass A but in reality often the same parameter is just passed to superclass so it would make sense to offer generation of "B(int i)" too.
Comment 1 Dusan Balek 2011-04-18 10:03:15 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/35ca34be099e
Comment 2 jesselong 2014-03-10 08:38:33 UTC
This seems to be broken in Netbeans 7.4 again. It was working in 7.3, but with 7.4 pressing CNTRL-SPACE in the class body bring up the suggestions, but includes only one no-args constructor.