Code-completion settings for Netbeans 7.3.1?

三世轮回 提交于 2019-12-07 08:55:10

问题


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


来源:https://stackoverflow.com/questions/18518640/code-completion-settings-for-netbeans-7-3-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!