Java – How to make auto completion in netbeans include both variables as well as methods

autocompletejavanetbeans

I was curious if anyone knows a way (by using a setting or a plugin or something), that would allow me to select variable names on the fly in netbeans, in the same way that Visual Studio 2008 does using an automatic popup window? At the moment I can access them by pressing Ctrl + Space, but I wondered if there is a way that I could avoid this and just have them come up automatically as I type, and the methods would come up with the '.' operator as normal?

The settings in 'Tools->Options->Editor->Code Completion' doesn't seem to have the Ctrl + Space setting I'm looking for, only a tickbox for toggling the normal '.' code completion of method names on or off..

(if it helps, the version of Netbeans is 6.9.1, and I'm writing in Java for Glassfish)

Best Answer

I tried to get the desired feature by adding the alphabet to the completion selectors. It worked somewhat, you can always try it.

Goto:

Tools -> Options -> Editor -> Code Completion

Select

Language: [Java]

Check:

[X] Auto Popup on Typing Any Java Identifier Part

Completion Selectors for Java:

[.,;:([+-=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVXYZ]

Good Luck!

Related Topic