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

Bug 350749

Summary: False validation error involving [var infinity = Infinity]
Product: [WebTools] JSDT Reporter: Sebastien Tardif <sebtardif>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: RESOLVED WORKSFORME QA Contact: Chris Jaun <cmjaun>
Severity: normal    
Priority: P3 CC: george_f
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Sebastien Tardif CLA 2011-06-29 17:06:54 EDT
Build Identifier: 3.6.2.r362

Ext JS 4 is using a lot this construct:
var infinity = Infinity

Infinity with upper case is part of the Global namespace. 



Reproducible: Always

Steps to Reproduce:
Load Ext JS 4 library inside Eclipse JavaScript editor
Comment 1 Nitin Dahyabhai CLA 2011-06-29 17:13:34 EDT
What is the error message?
Comment 2 Sebastien Tardif CLA 2011-06-30 08:16:29 EDT
Error is:
Syntax error on token "infinity", invalid VariableDeclaratorId	
File: ext-all-debug-w-comments.js line 57856 JavaScript Problem
getBBox: function() {
        var i = 0,
            sprite,
            bb,
            items = this.items,
            len = this.length,
            red>>infinity<<red = Infinity,
            minX = red>>infinity<<red,
            maxHeight = -infinity,
            minY = infinity,
            maxWidth = -infinity,
            maxWidthBBox, maxHeightBBox;
Comment 3 george_f CLA 2011-08-02 11:01:47 EDT
it seems it isn't even possible to 'workaround' this issue by changing the JS validation preferences.
Comment 4 Sebastien Tardif CLA 2013-06-14 11:09:24 EDT
The entire JS validation module is very bad and has no visible owner. It also slowdown my entire team and crash Eclipse if the files are big. Trying to stop the validation is an extreme pain, it always show a stupid popup saying that to apply that we need to rebuild everything... which is like 1 hour. It's a piece of garbage, they should scrap it and try again.
Comment 5 Chris Jaun CLA 2013-10-23 17:06:22 EDT
This validation error is no longer shown in WTP 3.6 and 3.5.1.