NetBeans java code completion is eager to please

Is the default behavior of code completion normal when editing Java?

>If I import a package, after entering the first package, any key I press will lead to the selection of the first item in the list > sometimes NetBeans will make some crazy jumps and insert private after entering P or PU when typing keywords such as public and protected! > Generally speaking, it often makes some big guesses in automatic completion, which is not supported by my previous input

I don't think this is an ideal behavior for every user Is there any way to make code complete without automatically completing anything, or at least make it less urgent?

Editor: to be clear, I don't want to disable the sometimes useful "autopopup window" I want methods, syntax, tips and suggestions like that eagerly in the window - I just don't want NetBeans to try to guess what I want because it's wrong 90-100% of the time

Solution

Which version of NetBeans are you using, because this doesn't seem to be the behavior I saw in 7.1

The autocomplete pop-up will not be displayed until I press the CTRL spacebar If I type "P" and then click Ctrl space, a pop-up window displays "private", "protected" and "public" I can continue typing (and the list gets smaller as possible matches are deleted) or use the cursor to select the word I want and press enter

If there is only one logical option, for example, I start typing "Pu", then click Ctrl space, and then NetBeans automatically inserts "public" (although it can be closed)

Code templates are a different story, and I set them to activate using shift space As far as I know, the template does not display any pop-up windows Anyone who likes pain can consider changing the activation key to space: P

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>