Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 325519

Summary: Parse of jQuery library results in parse error b/c of undefined
Product: [WebTools] JSDT Reporter: Scott Kellicker <s.kellicker>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: CLOSED DUPLICATE QA Contact: Nitin Dahyabhai <thatnitind>
Severity: major    
Priority: P3 CC: cmjaun
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
jQuery .js file to copy to Web Context none

Description Scott Kellicker CLA 2010-09-16 15:54:26 EDT
Build Identifier: latest source (9/16/2010)

This is new since Helios release.  I know there were some proposed parser changes around undefined...

The following errors appear in Error Log:

Description	Resource	Path	Location	Type

String literal is not properly closed by a double-quote	jquery-1.4.2.js	/test/WebContent	line 2912	JavaScript Problem

Syntax error on token ",", . expected	jquery-1.4.2.js	/test/WebContent	line 2663	JavaScript Problem

Syntax error on token "undefined", invalid FormalParameter	jquery-1.4.2.js	/test/WebContent	line 1	JavaScript Problem

Syntax error on token "undefined", invalid FormalParameter	jquery-1.4.2.js	/test/WebContent	line 16	JavaScript Problem




Reproducible: Always

Steps to Reproduce:
1. With latest source code, create static web project
2. Copy attached jQuery library into Web Context.
3. Observe errors
Comment 1 Scott Kellicker CLA 2010-09-16 15:55:10 EDT
Created attachment 179064 [details]
jQuery .js file to copy to Web Context
Comment 2 Chris Jaun CLA 2010-09-16 15:59:04 EDT

*** This bug has been marked as a duplicate of bug 324416 ***
Comment 3 Scott Kellicker CLA 2010-09-16 16:03:01 EDT
I think they are actually different.

This bug shows errors in the problems view.  And is not a problem in the Helios release.

While 324416 shows no errors in the problems view, but seems to show internally scoped variables as top level variables in the outline view.
Comment 4 Chris Jaun CLA 2010-09-16 16:16:54 EDT
(In reply to comment #3)
> I think they are actually different.
> 
> This bug shows errors in the problems view.  And is not a problem in the Helios
> release.
> 
> While 324416 shows no errors in the problems view, but seems to show internally
> scoped variables as top level variables in the outline view.

The symptoms seem different, but I'm pretty sure they have the same root problem.

Do you have the ability to test with the patch attached in the duplicated bug?
Comment 5 Scott Kellicker CLA 2010-09-16 16:57:01 EDT
The patch resolves the parse errors in this bug.

However, the symptoms in bug 324416 are still there (e.g. _load listed at top level variable multiple times in Package Explorer and Outline view).