Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367330 - js file with unmatched "}" crashes project validation, and can't be opened.
Summary: js file with unmatched "}" crashes project validation, and can't be opened.
Status: RESOLVED WORKSFORME
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-21 10:07 EST by Roee Mising name CLA
Modified: 2012-01-18 21:19 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.