Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netbeans automatic code completion of variables

Tags:

netbeans

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.

like image 721
skiwi Avatar asked Jul 02 '13 19:07

skiwi


2 Answers

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.

like image 67
2 revs Avatar answered Sep 29 '22 08:09

2 revs


Go to (Tools -> Options -> Editor -> Code Completion)

Select Language Java add tick to Auto Popup on Typing Any Java Identifier Part

and you can tick Subword Completion

like image 23
melek_3 Avatar answered Sep 29 '22 09:09

melek_3