Code-completion settings for Netbeans 7.3.1?

2019-05-09 11:05发布

问题:

I have found many tweaks that I really want in this question (remove delay, show without specific combinations, just like Visual Studio): Is it possible to make the auto-complete in netbeans not depend on a key-combination?

However, in Netbeans 7.3.1, I found no Advanced Options, and I tried to type 'delay' in the search box, still no thing popped out. In a comment section, I found the solution to pop out the code completion without having to type something. But it still have delay, and it greatly reduces my coding speed compare to Eclipse.

Can you tell me where can I remove the delay in Netbeans 7.3.1?

回答1:

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

Then, change the Language to Java and check Subword completion. This allows partial keywords to open up the code completion box, shortening the delay, but not removing it completely.

Hope it helps.



回答2:

The surefire way to remove the code completion window delay is to edit the XML configuration file of NetBeans. The configuration file's location varies by system.

On Mac:

~/Library/Application Support/NetBeans/8.2/config/Editors/text/x-java/Preferences/org-netbeans-modules-editor-settings-CustomPreferences.xml

On Windows:

%APPDATA%\NetBeans\8.2\config\Editors\text\x-java\Preferences\org-netbeans-modules-editor-settings-CustomPreferences.xml

Add the following to the file:

<entry javaType="java.lang.Integer" name="completion-auto-popup-delay" xml:space="preserve">
    <value><![CDATA[0]]></value>
</entry>

Restart NetBeans.

This will set the delay of code completion auto popup to 0 seconds.

Sources:

  • https://netbeans.org/bugzilla/show_bug.cgi?id=193266
  • https://netbeans.org/bugzilla/show_bug.cgi?id=124540
  • http://wiki.netbeans.org/FaqWhatIsUserdir