This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 193266

Summary: "Code Completion" auto popup delay time should be configurable.
Product: php Reporter: zvk77
Component: EditorAssignee: Ondrej Brejla <obrejla>
Status: NEW ---    
Severity: normal CC: chrizzly, geertjan, hair
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description zvk77 2010-12-11 04:14:03 UTC
I think, that "Code Completion" auto popup delay time should be configurable. 

Now, value of 750 ms hardcoded in method scheduleShowingCompletion() in 
php.editor\src\org\netbeans\modules\php\editor\PHPCompletionItem.java

I prosose change this line 
==
750, TimeUnit.MILLISECONDS
==

with something like
==
CodeCompletionAutoPopupTimeMS, TimeUnit.MILLISECONDS
==
, and show this variable as option in 
Tools -> Options -> Editor -> Code Completion [ -> PHP ?]

750 ms - it's very long time for me, and not only for me. For example, I would prefer to set this value in 200 - 300 ms.
Comment 1 rburkhead 2011-01-06 15:26:27 UTC
I am not certain what the impact of the hard-coded 750ms is, but I was able to (inconveniently) configure the auto-completion popup time in NB 6.9.1 as follows:

In .netbeans/config/Editors/text/x-php5/Preferences I created a file org-netbeans-modules-editor-settings-CustomPreferences.xml

In that file, I put the following:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE editor-preferences PUBLIC "-//NetBeans//DTD Editor Preferences 1.0//EN" "http://www.netbeans.org/dtds/EditorPreferences-1_0.dtd">
<editor-preferences>
    <entry name="completion-auto-popup-delay" value="3000" />
</editor-preferences>

That changed the auto-completion pop-up to 3 seconds (obviously only for the PHP editor).

The above notwithstanding, I agree that this value should be configurable from Tools -> Options -> Editor -> Code Completion
Comment 2 Sc0tTyXL 2011-01-15 11:53:28 UTC
I would really like to change this value, in VS.net i have it set to 0
Comment 3 nexxer 2011-05-24 09:25:26 UTC
(In reply to comment #1)
> I am not certain what the impact of the hard-coded 750ms is, but I was able to
> (inconveniently) configure the auto-completion popup time in NB 6.9.1 as
> follows:
> 
> In .netbeans/config/Editors/text/x-php5/Preferences I created a file
> org-netbeans-modules-editor-settings-CustomPreferences.xml
> 
> In that file, I put the following:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE editor-preferences PUBLIC "-//NetBeans//DTD Editor Preferences
> 1.0//EN" "http://www.netbeans.org/dtds/EditorPreferences-1_0.dtd">
> <editor-preferences>
>     <entry name="completion-auto-popup-delay" value="3000" />
> </editor-preferences>
> 
> That changed the auto-completion pop-up to 3 seconds (obviously only for the
> PHP editor).
> 
> The above notwithstanding, I agree that this value should be configurable from
> Tools -> Options -> Editor -> Code Completion

Just to add to this, in 7.0 the XML format is slightly different:

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

worked for me, although it still feels a bit slow.
Comment 4 cromat 2011-10-18 13:49:36 UTC
I can create a new enhancement for this as well, but this should technically be configurable for all languages. I would like to see this put in for php, java, and html.
Comment 5 enzipher 2012-08-22 17:04:23 UTC
(In reply to comment #3)
> Just to add to this, in 7.0 the XML format is slightly different:
> 
> <entry javaType="java.lang.Integer" name="completion-auto-popup-delay"
> xml:space="preserve">
>     <value><![CDATA[5]]></value>
> </entry>
> 
> worked for me, although it still feels a bit slow.

I am using 7.2 and I was wondering why this didn't work, but it turns out that the value is in milliseconds and not seconds.
Comment 6 _ hair 2013-01-20 11:24:49 UTC
why not make this (also) a general setting available for all languages.
i'm primarily using the java editor, and find that the autocompletion pops up too quickly and wrecks what i'm typing naturally.
Comment 7 Christian Lenz 2014-08-13 07:24:40 UTC
This feature would be awesome and hope that it will solve my problem. I'm faster with typing before code completion comes up. I would really use it, I think that it starts onKeyPress but for me it starts after 300 - 500ms. Tested in JS and Java. Have Windows 7, 64bit and NetBeans IDE Dev (Build nbms-and-javadoc-1975-on-20140804) (#77b3122f0984). I know it from Visual Studio with the ReSharper plugin that the Code Completion starts onKeyPress right now. The same in Sublime Text 2 and this is better, I don't want to wait 300ms or so until the code completion comes up, after I already wrote the word.

If you type "w", wait 300ms code completion comes up and then remove w, the code completion is already there and fast if you write "a" or "s". And this is what I expect when I begin to type. It should comes up right now.


Regards

Chris
Comment 8 Christian Lenz 2017-02-09 12:30:14 UTC
It is a no go for me in some cases to have hard coded stuff. Maybe it was a test before or so, but such things should be configurable by the user. 750ms is really to long. Please add a configurable delay feature. I think there are more tickets for such things: https://netbeans.org/bugzilla/show_bug.cgi?id=124540 (Very old bug, with WONTFIX but with the same solution). Here too: https://netbeans.org/bugzilla/show_bug.cgi?id=179330