| Summary: | JSDT cannot correctly parse jQuery 1.4.2 files | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Scott Kellicker <s.kellicker> | ||||||||
| Component: | General | Assignee: | Chris Jaun <cmjaun> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | Nitin Dahyabhai <thatnitind> | ||||||||
| Severity: | major | ||||||||||
| Priority: | P3 | CC: | bouiaw, brion, buckett, cmjaun, eclipse, eostroukhov, jacek.pospychala, jdance, paul.beusterien, sslavic, youngm | ||||||||
| Version: | unspecified | Flags: | thatnitind:
review+
|
||||||||
| Target Milestone: | 3.2.3 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Scott Kellicker
Created attachment 178148 [details]
jQuery .js file to add as a library
Scott, do you know what exactly breaks JSDT's parser in jQuery 1.4? In 1.3 I remember it was the use of "undefined" as a variable (bug 298577). After removing 1 line, all jQuery file was parsed correctly. I'm wondering what this time :-) (In reply to comment #2) > Scott, > do you know what exactly breaks JSDT's parser in jQuery 1.4? In 1.3 I remember > it was the use of "undefined" as a variable (bug 298577). After removing 1 > line, all jQuery file was parsed correctly. > > I'm wondering what this time :-) No idea. I haven't taken the time to dig into it. I did take a glance at the log and didn't see anything obvious. The fact that _load is being considered a variable, makes me think that its tripping on constructs like this: var jsc = now(), rscript = /<script(.|\s)*?\/script>/gi, rselectTextarea = /select|textarea/i, rinput = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i, jsre = /=\?(&|$)/, rquery = /\?/, rts = /(\?|&)_=.*?(&|$)/, rurl = /^(\w+:)?\/\/([^\/?#]+)/, r20 = /%20/g, // Keep a copy of the old load method _load = jQuery.fn.load; Created attachment 178538 [details]
proposed patch to treat undefined as a regular identifier and not a keyword (does not update syntax coloring)
I tried the proposed patch with latest source. There was no change in the behavior. I think the problem must be elsewhere. Strange. Without the patch the Outline view simply shows a flat list of functions and variables. With it, a jQuery type is created, although it's missing every function that's added by jQuery.extend(). *** Bug 277165 has been marked as a duplicate of this bug. *** *** Bug 325519 has been marked as a duplicate of this bug. *** *** Bug 298577 has been marked as a duplicate of this bug. *** *** Bug 326894 has been marked as a duplicate of this bug. *** Created attachment 182052 [details]
Updated patch
*** Bug 289806 has been marked as a duplicate of this bug. *** *** Bug 289805 has been marked as a duplicate of this bug. *** Could you provide a binary patch for WTP 3.2.2 in order to make testing easier ? Since this is a blocking issue for a lot of users, it could help a lot of people. (In reply to comment #11) > Created an attachment (id=182052) [details] > Updated patch Unrelated change in org.eclipse.wst.jsdt.internal.compiler.batch.CompilationUnit? (In reply to comment #15) > (In reply to comment #11) > > Created an attachment (id=182052) [details] [details] > > Updated patch > > Unrelated change in > org.eclipse.wst.jsdt.internal.compiler.batch.CompilationUnit? No, that is needed so that the junits pass. Checked into 3.2.3 and HEAD. |