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 244967 - Wrong code completion list after ctrl + space.
Summary: Wrong code completion list after ctrl + space.
Status: CLOSED WONTFIX
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-09 21:45 UTC by Christian Lenz
Modified: 2014-06-30 11:33 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Correct list (118.77 KB, image/png)
2014-06-09 21:45 UTC, Christian Lenz
Details
Wrong list (131.67 KB, image/png)
2014-06-09 21:45 UTC, Christian Lenz
Details
Code complete Problem (96.23 KB, image/gif)
2014-06-26 07:32 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-06-09 21:45:00 UTC
Created attachment 147623 [details]
Correct list

As you can see it in the sample code in the correct.png, the code completion list is correct when I type "blau.". Only 2 options are visible, now when I type ctrl + space right after setting the dot and the code completion list came up, I see all relevant, but not correct entries as sub types for blau. This is really confusing and I have to figure out which is the right property for it.
Here it is ok because I can see it above but this is not a realistic example.


Regards,

Chris
Comment 1 Christian Lenz 2014-06-09 21:45:33 UTC
Created attachment 147624 [details]
Wrong list
Comment 2 Vladimir Riha 2014-06-10 06:18:48 UTC
This is as designed. If you open code completion for the first time (in your case after you press the dot it comes automatically), it shows items that NetBeans were able to resolve. 

If you invoke code completion while it is already displayed (so you either press Ctrl+Space twice or in your case have code completion opened because of the dot and press Ctrl+Space), it shows "everything". This is because it is not always possible to resolve variable and all its properties and this lets you see "full" code completion. 

If you press Esc to hide code completion, you can again press Ctrl+Space once or twice to see either "partial" or "full" code completion.
Comment 3 Christian Lenz 2014-06-23 13:15:20 UTC
ok thx.
Comment 4 Petr Pisl 2014-06-23 15:09:34 UTC
I can just confirm what was written by Vlada.
Comment 5 Christian Lenz 2014-06-26 07:32:33 UTC
I see an other problem. This is my source (only for example):

function test() {
    var baumWipfel = 0;

    if(true) {

    }
}

I type "b" inside if and I saw baumWipfel and break as suggestions. But when I type b and the list not appears exactly on keyup (maybe with a delay on a few ms), I type Ctrl + Space because I'm faster as the list I got the message: "No suggestion". You can see the behaviour in my little screencast (Code complete problem).


Regards

Chris

P.S. I reopened it, if it's not related to this, I will create a new one.
Comment 6 Christian Lenz 2014-06-26 07:32:58 UTC
Created attachment 147781 [details]
Code complete Problem
Comment 7 Vladimir Riha 2014-06-30 08:09:04 UTC
Yes please, file a new one, thank you. I've briefly tried it but cannot reproduce it. Should you have some public sample project where it happens, could you please attach it to the new issue as well? Thank you.
Comment 8 Christian Lenz 2014-06-30 11:33:10 UTC
Done: https://netbeans.org/bugzilla/show_bug.cgi?id=245315

Thx.