views:

133

answers:

2

This is a particularly annoying problem I'm having, and I can't be the only one to have issue with it.

In NetBeans, when you type part of a method, then hit CTRL-SPACE, it displays the code-completion popup, whereupon you can hit tab to finish out the word. This is great, and pretty much how all IDE's operate.

Example:

Thread.sl

< CTRL-SPACE >

Thread.sleep

Yay!

Problem is that in this context, once you type in a paren, it auto-fills the parameters for the method with their default names, and inserts a closing paren (regardless of whether you have disabled the option to automatically close them on the preferences page for code completion). This behavior is NOT present if you had manually typed out the full name.

How is this helpful to anyone? You've got to type over it your actual variable that you will be passing, and NetBeans gives you no option to prevent the closing paren on code-completion.

Does anyone have a way to solve this issue, without having to dive into the netbeans source and build it just for this minor of an issue?

+1  A: 

What version of netbeans do you use ?

For me (NB 6.9 RC1), when I code complete a method with parameter, I can edit one by one all parameters with RETURN to go from one to another. It's very easy, and the suggestings parameters are 1/2 times corrects.

See Suggesting Parameters at Code Assistance in the NetBeans IDE Java Editor: A Reference Guide / Smart Code Completion

Istao
I realize that is preferable to some, but not to others. When you've been typing code rapidly for a decade, it's quite a disturbance to try to change that, and if there were an option where the user is given a *choice* in the matter, that would be pleasing.
byte
You can configure conditions popups for auto completion with "Tools / Options / Editor / Code completion".
Istao
@Istao: That doesn't relate to the problem at hand at all. The question is relating to the parameter insertion behavior of auto completion, not the popup behavior of auto completion.
byte
+1  A: 

inserts a closing paren (regardless of whether you have disabled the option to automatically close them on the preferences page for code completion).

That option is for brackets, not parentheses.

Does anyone have a way to solve this issue, without having to dive into the netbeans source and build it just for this minor of an issue?

Remove the opening parenthesis from the list of completion selectors.

alt text

JRL
You sir win 100 (in 7 hours). Much thanks.
byte