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 123697 - Turning off guessed parameter auto-filling.
Summary: Turning off guessed parameter auto-filling.
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 3 votes (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-09 07:11 UTC by kazster
Modified: 2008-03-25 11:45 UTC (History)
1 user (show)

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 kazster 2007-12-09 07:11:04 UTC
There needs to be something in the options to turn this feature off. Read below for rationale:

I need this feature off (default to the old 5.5.1 style) because I make use of the error marker indicator it produces 
when it puts in empty parameters or parameter names. I know it sounds weird, but the java classes I work with at times 
are very large. As you can imagine, I do a lot of scrolling and I use the error indicator as a quick bookmark to come 
back and finish inputting the parameters after finding whatever I was looking for.

Furthermore: This is NOT a useful feature. It is largely useless, if not counter-productive. There is no use in pre-
filling parameter's with poor guesses. How someone thought that this kind of code-completion (if you can even call it 
that) would be useful is beyond me. I know for a fact that I'm not the only person having major problems with this. If 
you're going to provide code-completion functionality that you suspect is going to annoy some/most users, you might as 
well provide an option to turn it off.
Comment 1 _ wadechandler 2007-12-28 21:21:45 UTC
I think the notion it is useless lies on the same path as not having an option to turn it off. Too many different uses
etc for it to be so black and white an issue. I use it all the time and find it makes things very much productive. So,
it is certainly not useless. 

If you have local or field variables which match the names of the method parameters it can guess correctly more easily.
If not, then the times it gets it wrong you still have a positional place holder you can tab to and start typing and it
removes it. But, having the positional places is good as you can tab over to it and replace it, but this could be done
using the names of the parameters from the called method just as well I suppose, so if you were able to turn this off
all together would you want it to inject the names of the parameters of the called method so you know what goes where?

If you need an incorrect parameter then you could just hit tab to get to each parameter you don't want and press SHIFT+X
as you probably never have a capital variable named X and if it were a class name it would be wrong as well for a
parameter (though I doubt you would have X as a real class name either). Then if you had a file with so much noise on
the annotations gutters you could pick them out easier by finding one and clicking on the X to see every where it was
used or just search for X...not many names with X in them unless dealing with coordinates.
Comment 2 kazster 2007-12-28 22:46:53 UTC
"I think the notion it is useless lies on the same path as not having an option to turn it off. Too many different uses
etc for it to be so black and white an issue. I use it all the time and find it makes things very much productive. So,
it is certainly not useless."

-- I don't think that I'm over-simplifying. This type of auto-completition seems to be a solution to a problem no one 
had.


"so if you were able to turn this off
all together would you want it to inject the names of the parameters of the called method so you know what goes where?"

-- Either/or. I think main concern here is the mandated use of these features. There needs to be an ability to turn 
this (and other major features) off. This isn't the only case where netbeans "forces" a feature onto someone. You may 
find that this type of auto-completion works for you, however when I try to use it and get results like this:

System.arraycopy(table, fpPi, table, fpPi, fpPi);

I find it incredibly annoying, distracting, useless, and counter-productive. Imagine if someone forgets to change one 
of many generated values, or erronously identifies the generated value as correct (maybe two varaibles have similar 
names, and the user didn't pick up on the subtle differences). They might spend hours, days, or possibly weeks trying 
to spot/fix the bug.

According to the "release roadmap" it doesn't look like a new release will be provided until late next year. I might 
just try hacking a fix to this (and other problems) when I get some time.



In anycase, thank you for your reply. It's nice knowing that someone is listening.
Comment 3 nb_anm 2008-01-02 22:53:42 UTC
I would like to state that for me this feature is very annoying, too.

Comment 4 stefan79 2008-02-07 11:41:40 UTC
I also want turn off this feature, because it take´s to long.
Comment 5 cruxic 2008-03-13 00:19:25 UTC
My entire programming team dislikes this feature.  However, I disagree with those who assert that it is simply not a
useful feature.  Many people do, in fact, like it.

A few months ago my team switched to Netbeans after years of using JBuilder.  Being the one who recommended Netbeans,
I've borne countless complaints about "that stupid" parameter completion.  I'm not exaggerating here.  Even after all
these months of being forced to use it my team still doesn't like it.

Back then I started a thread to discuss the notion of adding a checkbox to turn it off.  I heard arguments from both
sides.  In the end it seemed pretty clear that many like it and many do not.  You can read for yourself:
http://www.nabble.com/Can-parameter-guessing-feature-be-disabled-td14411914.html#a14411914

Why force this feature upon people that don't like it?  Clearly it's a matter of "preference"!  Is a checkbox in the
options really that difficult?
Comment 6 Vitezslav Stejskal 2008-03-25 11:45:24 UTC
There is the 'Guess Filled Method Arguments' checkbox in Tools-Options -> Editor -> General -> Code Completion. When
unchecked the CC won't try to guess values for the arguments and instead it will fill in the formal names from the
method declaration.