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 214978 - Continuous completion in jQuery
Summary: Continuous completion in jQuery
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
: 218187 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-29 10:32 UTC by Vladimir Riha
Modified: 2013-08-29 06:41 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2012-06-29 10:32:24 UTC
Having following JS code:
 $("").hide();

Now if you type something in between "" and invoke cc, list of suggestion is offered. If you type another character, the list is hidden instead of being reduced to items matching the new selector


Product Version: NetBeans IDE Dev (Build 2012-06-29_00-38-59 )
Java: 1.7.0_05; Java HotSpot(TM) Client VM 23.1-b03
System: Linux version 3.0.0-21-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Petr Pisl 2012-07-13 09:16:58 UTC
Reproducible, only one correction. When you press a letter, then it works, if you press chars like '.', then it doesn't work as is described.
Comment 2 Martin Fousek 2012-11-22 12:55:46 UTC
Should be fixed in web-main #0aa148d4164e.
Comment 3 Quality Engineering 2012-11-23 02:40:57 UTC
Integrated into 'main-golden', will be available in build *201211230002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/0aa148d4164e
User: Martin Fousek <marfous@netbeans.org>
Log: #214978 - Continuous completion in jQuery
Comment 4 Vladimir Riha 2012-11-23 07:18:20 UTC
Thanks, sample from description works fine. Following case not though:

$(".myclass.o|").each("");
or
$("div #i|").each()


typing after #i closes/hides cc window. After offline discussion I'm reopening it. Thanks


Product Version: NetBeans IDE Dev (Build web-main-9303-on-20121122)
Java: 1.7.0_10-ea; Java HotSpot(TM) Client VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_10-ea-b16
System: Linux version 3.2.0-33-generic-pae running on i386; UTF-8; en_US (nb)
Comment 5 Martin Fousek 2012-11-23 13:07:09 UTC
(In reply to comment #4)
> Thanks, sample from description works fine. Following case not though:
> 
> $(".myclass.o|").each("");
> or
> $("div #i|").each()

That was a really good catch. It's about prefix computing. I suppose that in next release could have jQuery it's own language and completion handler - I'll talk about that with PetrP. Anyway now it should be fixed.

web-main #30a32d52018b
Comment 6 Quality Engineering 2012-11-25 03:10:04 UTC
Integrated into 'main-golden', will be available in build *201211250002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/30a32d52018b
User: Martin Fousek <marfous@netbeans.org>
Log: #214978 - Continuous completion in jQuery
Comment 7 Vladimir Riha 2012-11-26 09:01:14 UTC
Thanks, now it is perfect

Product Version: NetBeans IDE Dev (Build web-main-9331-on-20121126)
Java: 1.7.0_10-ea; Java HotSpot(TM) Client VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_10-ea-b16
System: Linux version 3.2.0-33-generic-pae running on i386; UTF-8; en_US (nb)
Comment 8 Martin Fousek 2012-11-30 13:53:35 UTC
According to issue #223050c#1. This must be fixed in another way. The jQuery must have it's own language and completionHandler for couting its own prefix using its own identifiers chars. Part of the previous solution was reverted back (in the JsLanguage). Let's see how big the fix with the custom completionHandler will be.

Reopening...
Comment 9 Martin Fousek 2012-12-03 16:03:27 UTC
Own completion handler is not the way since the jQuery shouldn't have probably complete language. So the way will be API/SPI for completion of JavaScript frameworks.
Comment 10 Petr Pisl 2013-07-18 14:29:50 UTC
*** Bug 218187 has been marked as a duplicate of this bug. ***
Comment 11 Petr Pisl 2013-08-27 22:34:04 UTC
Should be fixed now. http://hg.netbeans.org/web-main/rev/2e6d2868c6cb
Comment 12 Quality Engineering 2013-08-29 01:41:24 UTC
Integrated into 'main-silver', will be available in build *201308290001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/2e6d2868c6cb
User: Petr Pisl <ppisl@netbeans.org>
Log: #214978 - Continuous completion in jQuery
Comment 13 Vladimir Riha 2013-08-29 06:41:41 UTC
Thank you, continuous completion works OK now. Verified


Product Version: NetBeans IDE Dev (Build 201308290001)
Java: 1.7.0_40; Java HotSpot(TM) Client VM 24.0-b55
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b39
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)