6

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.

Community
  • 1
  • 1
skiwi
  • 66,971
  • 31
  • 131
  • 216

2 Answers2

12

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.

skiwi
  • 66,971
  • 31
  • 131
  • 216
2

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

melek_3
  • 117
  • 1
  • 13
  • Was this added recently? I'm asking this because I'm wondering if I missed that option when I asked this question or if it's new. – skiwi Jul 12 '16 at 21:17
  • I also had problems with it . When i research i found this option and I wanted to share. I don't know this added recently or not. – melek_3 Jul 13 '16 at 06:07