Autocomplete in Netbeans

2020-06-03 03:47发布

问题:

I use Netbeans 7.2.1, when I type private String a(Java code), the IDE shows a tip window aString which asks me to name a variable with its type as postfix. In addition, when I continue to type ;, it completes the code with private String aString;. Actually, I do not like this naming style, so, how to change the settings?

回答1:

For windows :

  1. Go to Tools > Options > Editor > Code Completion
  2. Select Language Java from dropdown
  3. Auto pop-up on typing any Java identifier part

You can take help from the images below:



回答2:

Under Preferences -> Editor -> Code Completion is where you can find the auto complete properties. You can disable the 'Auto Popup Completion Window' to keep it from automatically popping.

You can bring up the auto complete popup with the hotkey: control+space

Also while the completion window is displayed, pressing the esc will close it without inserting an autocomplete value.



回答3:

Go to: Preferences -> Editor -> Formatting.

In the drop-down box "Language", choose "Java".

There are many other categories you can choose from and you can customize your code formatting style there.