Netbeans变量的自动代码完成 [英] Netbeans automatic code completion of variables
问题描述
我发现了一个有趣的Stackoverflow主题,但这是一个古老的话题,我担心人们不会再做出反应了,所以我希望可以创建一个新话题.
首先,我正在使用Netbeans 7.2,并且我想更多地使用自动代码完成功能.它在带有."的方法/类上很好用.已经,但我也希望将其用于变量名.
所以我找到了这个主题:选项"->编辑器"->代码完成"),它确实可以完成一些工作.但是,一旦我输入下一个字母,它仍然会决定自动完成它.
有人知道为此或其他方法实现此目的的解决方法吗?
致谢.
啊,我现在发现了它:如果要按照我在开篇文章中描述的那样进行设置,然后为Java中的完成选择器"设置它:
[.,;:([+-=]
(请注意最后留有多余的空格,很重要.
现在,它将不再自动完成任何字符,但仍会为您提供建议框.
I found an interesting Stackoverflow topic, but it is an old one and I'm afraid people won't be reacting anymore, so I hope it is ok to create a new one.
First of, I am using Netbeans 7.2 and I want to use automatic code completion more. It works nice on methods/classes with the '.' already, but I would like it for the variable names aswell.
So I found this topic: How can I make auto completion in netbeans include both variables as well as methods? , more precisly the accepted answer.
This is what I have always wanted! Except one issue, it decides to automatically insert the name if only one result is available, while I am still typing unaware of that fact.
I have tried disabling Insert Single Proposals Automatically (Tools -> Options -> Editor -> Code Completion), and it does kind of work. But once I type the next letter, it still decides to complete it automatically.
Does anyone know a fix for this or another way to achieve the same?
Regards.
Ah, I found it now: If you want it as I described in the opening post, then set this for Completion Selectors in Java:
[.,;:([+-=]
(Note the extra white space on the end, it is important.
Now it will not autocomplete on any character anymore, but still give you the suggestions box.
这篇关于Netbeans变量的自动代码完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!