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 241950

Summary: Global Variable Issues
Product: javascript Reporter: stephennix
Component: EditorAssignee: Petr Pisl <ppisl>
Status: VERIFIED FIXED    
Severity: normal CC: pjiricka, vriha
Priority: P2 Keywords: 8.0_HR_FIX
Version: 8.0   
Hardware: PC   
OS: Windows 8 x64   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log

Description stephennix 2014-02-16 18:39:04 UTC
In any JS file using Jquery, I am getting a hint saying "The global variable $ is not defined." when selecting a line referencing $.

Product Version = NetBeans IDE 8.0 Beta (Build 201401141042)
Operating System = Windows 8 version 6.2 running on amd64
Java; VM; Vendor = 1.7.0_51
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.51-b03
Comment 1 stephennix 2014-02-16 18:39:07 UTC
Created attachment 145259 [details]
IDE log
Comment 2 Vladimir Riha 2014-02-19 08:12:49 UTC
Reproducible, in 7.4 the $ and jQuery were ignored by this hint. You can also turn this hint off in Tools|Options|Editor|Hints| -> JavaScript and uncheck "The global variable is not declared" setting.
Comment 3 Petr Pisl 2014-02-19 12:52:54 UTC
The fix is very simple. http://hg.netbeans.org/web-main/rev/5ca10daf16e9

Vlade I think we could push the fix to the final releases. It's just adding two strings to a map. If you agree, we should increase this as p2.
Comment 4 Vladimir Riha 2014-02-19 13:06:54 UTC
Sure, I agree => P2
Comment 5 Quality Engineering 2014-02-20 03:03:24 UTC
Integrated into 'main-silver', will be available in build *201402200001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/5ca10daf16e9
User: Petr Pisl <ppisl@netbeans.org>
Log: #241950 - Global Variable Issues
Comment 6 Vladimir Riha 2014-02-20 08:44:42 UTC
Looks like it is in release80 branch already. Verified

Product Version: NetBeans IDE Dev (Build 201402200001)
Java: 1.8.0; Java HotSpot(TM) Client VM 25.0-b69
Runtime: Java(TM) SE Runtime Environment 1.8.0-b129
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Comment 7 Vladimir Riha 2014-02-20 09:03:06 UTC
Sorry, it is not in release80 branch... Adding HR_FIX_CANDIDATE keyword.
Comment 8 Petr Pisl 2014-02-20 19:14:21 UTC
Integrated to the release / release80 branch
Comment 9 Quality Engineering 2014-02-21 01:29:56 UTC
Integrated into 'releases/release80', will be available in build *201402202300* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/e352312de7cc
User: Petr Pisl <ppisl@netbeans.org>
Log: #241950 - Global Variable Issues
Comment 10 Vladimir Riha 2014-02-21 09:58:24 UTC
Verified in RC1

Product Version: NetBeans IDE 8.0 RC1 (Build 201402202300)
Java: 1.8.0; Java HotSpot(TM) Client VM 25.0-b69
Runtime: Java(TM) SE Runtime Environment 1.8.0-b129
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)