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 246410 - No code completion if you write the whole word to fast.
Summary: No code completion if you write the whole word to fast.
Status: REOPENED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-12 16:17 UTC by Christian Lenz
Modified: 2015-12-03 12:24 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
no code completion. (214.62 KB, image/gif)
2014-08-12 16:17 UTC, Christian Lenz
Details
IDE log (654 bytes, text/plain)
2014-08-12 16:18 UTC, Christian Lenz
Details
Java class lib example. (10.88 KB, application/x-7z-compressed)
2014-08-15 07:00 UTC, Christian Lenz
Details
Fast code completion (401.84 KB, image/gif)
2015-01-04 14:33 UTC, Christian Lenz
Details
Slower code completion (393.53 KB, image/gif)
2015-01-04 14:36 UTC, Christian Lenz
Details
toFast.gif (207.75 KB, image/gif)
2015-12-03 10:45 UTC, Christian Lenz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Lenz 2014-08-12 16:17:48 UTC
Created attachment 148655 [details]
no code completion.

As you can see in my screencast, sometimes the code completion works and sometimes not.

If I write foo and wait for the completion all is fine, then I type "." and I see the properties. If I type fooBar. and wait for it, all is fine too. The problem is, when I type "fooBar." to fast, the code completion doesn't work. I could reproduce it in Java and JS files atm, but I think it will happen in other cases too.


Regards

Chris
Comment 1 Christian Lenz 2014-08-12 16:18:15 UTC
Created attachment 148656 [details]
IDE log

Added IDE log.
Comment 2 Dusan Balek 2014-08-14 13:21:41 UTC
Unfortunately, I cannot reproduce the similar behavior in Java editor. Could you please attach a sample test case? Thanks.
Comment 3 Christian Lenz 2014-08-15 07:00:37 UTC
Created attachment 148713 [details]
Java class lib example.

It's only an example, didn't compile it but it doesn't care. As you can see it inside the ctor, you have to write "System." fast. WITH the dot. After this, nothing happens. The same I can reproduce inside JS files, maybe in PHP too but I didn't test it yet.


Regards

Chris
Comment 4 Dusan Balek 2014-08-15 08:51:09 UTC
Unfortunately, still no luck in reproducing the problem :-(
Comment 5 Christian Lenz 2014-08-15 09:07:34 UTC
Which system do you use? I have windows 7, 64 bit.
Comment 6 Christian Lenz 2014-09-04 07:31:10 UTC
Maybe it's a problem on windows(?).
Comment 7 Christian Lenz 2015-01-04 14:33:29 UTC
Created attachment 151357 [details]
Fast code completion

As you can see it in this screen cast, Visual Studio 2012 has no delay. Every code completion appears after onKeyDown instantly, not with a delay for netbeans or whatever.
Comment 8 Christian Lenz 2015-01-04 14:36:09 UTC
Created attachment 151358 [details]
Slower code completion

Here you can see that after maybe 200 or 300 or more or less ms, the list appears. So The code completion in visual studio is faster. I can't write the hole word without having the list is visual studio. But in netbeans it's possible. I can write overflow and the list appears after I end typing. Should I create a new issue for this because this is not only a JAVA problem, it's about the whole code completion inside netbeans. Maybe ReSharper in Visual Studio is the reason why it's faster. So an option to change the delay in netbeans would be find too.
Comment 9 Christian Lenz 2015-01-04 14:36:49 UTC
It happens in PHP, JAVA, JS, CSS, XML and HTML. These are the languages which I tested. I will test C/C++ too.
Comment 10 Dusan Balek 2015-04-14 09:18:26 UTC
OK - let's try to display code completion without default delay.

Fixed in jet-main.
http://hg.netbeans.org/jet-main/rev/2a31cf527bcb
Comment 11 Christian Lenz 2015-04-14 10:02:38 UTC
Thx, sounds nice. Will test if there is an other unexpacted behaviour. I prefer to have an numeric field to set the delay for code completion. Because if there are some problem, you have to change it again but if we have an option field, we can set it by our own.

There is a ticket for this: https://netbeans.org/bugzilla/show_bug.cgi?id=193266


Regards

Chris
Comment 12 Quality Engineering 2015-04-15 02:49:15 UTC
Integrated into 'main-silver', will be available in build *201504150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/2a31cf527bcb
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #246410: No code completion if you write the whole word to fast - fixed.
Comment 13 Christian Lenz 2015-07-13 14:09:14 UTC
I can reproduce the problem in the latest nightly, for me 201507130001. It happens for JavaScript files, when I check the option for code completion (All possible situations) Than you can see, what happens, if you have a look at the no code completion gif. When I don't use this option, everything is fine after hit the ".". For me all possible solution is my choice and when I type fooBar. to fast, I got the hint that there is a semicolon is missing and no code completion comes up. Should I use the mailing list for netcat?
Comment 14 Christian Lenz 2015-07-13 14:24:08 UTC
Happens in Java files too.
Comment 15 Dusan Balek 2015-07-15 08:03:30 UTC
Unfortunately, I cannot reproduce the issue in Java.

Reassigning to JavaScript to investigate why setting the 'All possible situations' option blocks an automatic code completion invocation.
Comment 16 Christian Lenz 2015-12-02 11:07:21 UTC
Should be fixed I think. But is there really no delay anymore?
Comment 17 Petr Pisl 2015-12-03 10:37:18 UTC
In JavaScript counting code completion take some times. I'm trying to speed up, but ... 

I have noticed that there can be problem in a case, when you write something like foo. , then after the dot the javascript cc is counted, but because sometimes it needs more time, user press ctrl+space and in this moment is started code completion for 'All possible situation'. Can be it this case?
Comment 18 Christian Lenz 2015-12-03 10:45:20 UTC
First I think this case can happen, maybe accidentally or for methods on the object to use them.

Second in JS files the code completion seems to be fixed when I write the word too fast but now I figured it out in a java file. For this please see my little screen capture "toFast.gif". When I type "super." to fast, the code completion never comes up.
Comment 19 Christian Lenz 2015-12-03 10:45:43 UTC
Created attachment 157640 [details]
toFast.gif
Comment 20 Petr Pisl 2015-12-03 12:24:14 UTC
Assigning back to editor