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 196229 - Showing constructor parameters
Summary: Showing constructor parameters
Status: REOPENED
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-03 14:24 UTC by TheDestroyer
Modified: 2011-03-03 15:49 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description TheDestroyer 2011-03-03 14:24:44 UTC
Dear Sir,

The improvement I'm proposing is simple. In netbeans, if one calls a function and then presses Ctrl+P they get the list of parameter-names to be passed to the function with its overloading possibilities. I just propose to have the same deal with classes' constructors.

So if the class has a constructor that requires parameters, why doesn't netbeans show those parameters' names upon pressing Ctrl+P? it's something a little bit annoying because one has to refer to the original class's constructor and read the parameters all over again to pass them in the right way.

for example: the function:

double add(double a, double b)
{
    return a+b;
}

for this function, if I write in the main:

add(

then Ctrl+P, I get the list of parameters with their types. But for the class:

class myclass
{
    double value1;
    myclass(double value1_param)
    {
        value1 = value1_param;
    }
};

now, in the main function, if I type:

myclass c(

then I press Ctrl+P, I won't see the relevant parameters.

I guess it's not a negligible issue and can be fixed easily :-)

Thank you,
Best regards,
Samer Afach
Comment 1 Jesse Glick 2011-03-03 15:09:12 UTC
(In reply to comment #0)
> now, in the main function, if I type:
> 
> myclass c(

I think you're thinking of C. In Java you would need

  myclass c = new myclass(

in which case Ctrl-P shows constructor parameters as expected.
Comment 2 TheDestroyer 2011-03-03 15:49:08 UTC
OMG I'm so sorry. Yes I'm talking of C++, I'm a C++ and C programmer. Is there anyway we could edit this?

(In reply to comment #1)
> (In reply to comment #0)
> > now, in the main function, if I type:
> > 
> > myclass c(
> 
> I think you're thinking of C. In Java you would need
> 
>   myclass c = new myclass(
> 
> in which case Ctrl-P shows constructor parameters as expected.