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?

4

2 回答 2

2

插入一个结束括号(无论您是否禁用了在首选项页面上自动关闭它们以完成代码的选项)。

该选项适用于括号,而不是括号。

有没有人有办法解决这个问题,而不必深入研究 netbeans 源代码并仅为这个小问题构建它?

从完成选择器列表中删除左括号。

替代文字 http://img411.imageshack.us/img411/7287/netbeanscodeassist.png

于 2010-06-06T02:20:03.580 回答
1

你用的是什么版本的netbeans?

对我来说(NB 6.9 RC1),当我用参数编码完成一个方法时,我可以用 RETURN 一个一个地编辑所有参数以从一个到另一个。非常简单,建议参数正确率1/2。

请参阅NetBeans IDE Java 编辑器中的代码帮助中的建议参数:参考指南/智能代码完成

于 2010-05-30T06:04:29.437 回答