Bug 253166 - Javascript validation has several errors with correct code
Summary: Javascript validation has several errors with correct code
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0.5   Edit
Assignee: Chris Jaun CLA
QA Contact: Phil Berkland CLA
URL: http://tweakimg.net/x/general.js
Whiteboard:
Keywords: contributed
: 265712 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-03 05:47 EST by Arjen CLA
Modified: 2010-03-03 11:13 EST (History)
3 users (show)

See Also:
thatnitind: review+


Attachments
Added Image and Option ot the base browser library (1.29 KB, patch)
2009-04-28 17:27 EDT, Chris Jaun CLA
thatnitind: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arjen CLA 2008-11-03 05:47:53 EST
Some of our javascript-files yield parse-errors with the (default installed) javascript validation in Eclipse Ganymede. This was in a PDT-"2.0", project with the "Eclipse IDE for Java EE Developers"-edition of Ganymede, enhanced with the latest "DLTK Core Frameworks 1.0 Integration build" and WTP 3.0.2

Some of the errors are in code like this:

var preloadImages = {};
function preload(label, url, overwrite)
{
	if (overwrite || !(label in preloadImages))
// The error: "The operator in is undefined for the argument type(s) any, ___anonymous866_867"
	{
		preloadImages[label] = new Image();
// The error: "Image cannot be resolved to a type"
// It also doesn't know about 'Option'
		preloadImages[label].src = url;
	}
}

The full javascript is in the URL-field.

There are several other errors in that file, of which most aren't errors according to the major browsers. Enabling the Firefox-library for that project doesn't help, adjusting any of the settings seems to be useless.
So either I'm missing something, or the validator is somewhat buggy.

Apart from that, it doesn't seem to be possible to disable the javascript-validation afterwards in a project?
Comment 1 Phil Berkland CLA 2008-11-14 17:29:59 EST
Fixed the // The error: "The operator in is undefined for the argument type(s) any,
___anonymous866_867"
 
for WTP 3.0.4

The Image needs to be added to the mozilla library.
Comment 2 Chris Jaun CLA 2009-04-28 17:27:41 EDT
Created attachment 133645 [details]
Added Image and Option ot the base browser library
Comment 3 Chris Jaun CLA 2009-04-28 17:28:10 EDT
Can be patched in 3.0.5 and 3.1.
Comment 4 Nitin Dahyabhai CLA 2009-04-29 00:18:32 EDT
Applied, thanks, Chris.
Comment 5 Chris Jaun CLA 2009-04-29 09:46:30 EDT
*** Bug 265712 has been marked as a duplicate of this bug. ***