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

Bug 367330

Summary: js file with unmatched "}" crashes project validation, and can't be opened.
Product: [WebTools] JSDT Reporter: Roee Mising name <s_roee>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: RESOLVED WORKSFORME QA Contact: Nitin Dahyabhai <thatnitind>
Severity: major    
Priority: P3 CC: linzuxiong1988
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Roee Mising name CLA 2011-12-21 10:07:30 EST
Build Identifier: 20110916-0149

Having file in project, containing only "}" (without matching "{"), will cause the validation on project to crash.
the file won't be editable as well since the change.

Reproducible: Always

Steps to Reproduce:
1.create js file.
2.set as content: }
3.try to build.
Comment 1 Lin ZuXiong CLA 2012-01-18 20:40:01 EST
I think the authors of JSDT donot know Javascript Language.

I suggest let us close the javascript validation. 
But eclipse jee 3.7.1 canot close JS validation.I close the Preference of javascript validation and make the level be Ignore ,but eclipse Problems still 
reports the problems (errors and warnings) of Javascript type .

Guys , you all can import a js file ,like JQuery-1.x , so that you can find
too many errors.
Comment 2 Nitin Dahyabhai CLA 2012-01-18 21:19:03 EST
(In reply to comment #0)
> Build Identifier: 20110916-0149
> 
> Having file in project, containing only "}" (without matching "{"), will cause
> the validation on project to crash.
> the file won't be editable as well since the change.
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1.create js file.
> 2.set as content: }
> 3.try to build.

Works for me.  New Java EE SR1 install, new JavaScript project, one file with "testor = function(){};" as its contents and the other with just "}" builds fine.  Were there more plug-ins installed?  Was there anything in the workspace's .log file about the crash, or a VM crash file?
Comment 3 Nitin Dahyabhai CLA 2012-01-18 21:19:11 EST
(In reply to comment #1)
Sounds like either bug 349020 or bug 344397, although probably with a newer version.