Community
Participate
Working Groups
Build ID: I20080617-2000 Steps To Reproduce: 1. An HTML file is opened on the Web page editor. 2. JavaScript is described. <script> - </script> 3. A defect is described with JavaScript. (The variable of the undefined is described.) Though an error marker is set up, nothing is indicated in the problem view. More information:
On the Validation preference page (or the Validation property page for your project, if project specific settings are enabled), is "JavaScript Syntax Validation" enabled?
> On the Validation preference page (or the Validation property page for your > project, if project specific settings are enabled), is "JavaScript Syntax > Validation" enabled? Yes. The marker of the error of Javascript/HTML comes out at the side of the Web Page editor. But, it isn't indicated in the problem view.
And you had automatic builds enabled? The Problems view would not be updated until the file was both saved and Validation run, either manually or as part of the Build.
Categorizing JSDT bugzillas for planning purposes.
I'm not able to reproduce this kindof. I'm never getting any JavaScript errors for javascript code inside HTML, however validation works fine for .js files. JavaScript Syntax Validator preference is enabled. This happens with JSDT plugins from R3_1_maintenance branch. Maybe I'm missing some plug-in that does this job? Which one is responsible for that?
Ok, now I'm getting validation errors. To enable javascript validation you have to: 1. Enable "JavaScript Syntax Validation" in Window->Preferences on Validation page 2. Enable "JavaScript semantic validation" in Window->Preferences on Web >JavaScript > Validator > Errors/Warnings page I can reproduce the bug as well. Markers don't appear in Problems view (as well as in Project Explorer) for files with ".js" extension, however file is validated and problems are visible in editor via red/yellow squiggles and icons on the editor's ruler. If I add ".js" extension to "JavaScript Syntax Validation" validator (on Window->Preferences, Validation page), then markers are visible in Problems view and Project Explorer view.
Created attachment 152930 [details] patch An obvious patch is to add ".js" to list of files extensions supported by jsValidator. If js is intentionally not on the list, please comment what is intended workflow so I'll be able to write a better patch :-)
I thought the problem described by this bug is that problems in html or jsp pages were not showing up in problems view, but that things in .js files are. Are you seeing different behavior Jacek? My understanding is that the jsValidator is only for web pages.
Ok, I'm getting closer. if you enable JavaScript semantic validation (on Web >JavaScript > Validator > Errors/Warnings preference page), then both JavaScript editor and HTML editor will be decorating javaScript code with all problems. But: - no markers are added. So there's no Problems in problems view and no decorations in Script Explorer for any files (for HTML but for .js AS WELL) - in HTML editor, icons on left ruler are missing (original reporter had this different) Now if I enable JavaScript Syntax Validator, then: - markers are added. Problems view and Script Explorer shows problems (e.g. for html and js files) - in HTML editor, icons on left ruler are back I still see that JavaScript files (.js) sometimes have and sometimes miss the problem markers - no problems in problems view or decorations in ScriptExplorer. But this seems to be more related to where is my file located, e.g. under JavaScript source folder, or in regular folder. Not sure yet. So I suppose, the fix for this problem is to enable "JavaScript Syntax Validator" in Window->Preferences on Validation page.
Hajime, are you still following us on this bug? In case you still see this problem recurring (altough you may well not after 1 year), could you check if JavaScript Syntax Validation is enabled in Window->Preferences on Validation page?
I think you are right Jacek. I think the validator is off by default because we were surfacing a lot of invalid problem message. That is less of a problem now in 3.2 and if semantic validation is disabled. At some point we may consider turning that validator back on by default.
Comment on attachment 152930 [details] patch I'll mark this patch obsolete based on further comments.
not "futher", I meant based on above comments - mainly comment 8
Works in 3.2.