开发者

NetBeans parameter fill after code completion

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-f开发者_StackOverflow社区ills 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?


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 http://img411.imageshack.us/img411/7287/netbeanscodeassist.png


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜