Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Eclipse Javascript Validator on Specific Folders

I'd like to disable Eclipse's Javascript validation on certain folders, namely the asset folder populated by Yii. I've tried to add validation filters to exclude the folder by doing the following in Eclipse

  1. Window > Preferences > Validation
  2. Click Settings for Client-side JavaScript Validator
  3. Add exclude group > Add Rule
  4. Check folder and file name > select the folder that I want to exclude

However, that doesn't seem to work. Eclipse still marks several jquery files in error. Any insights to this? Thanks in advance!

like image 640
Mr. 14 Avatar asked Sep 03 '12 12:09

Mr. 14


1 Answers

The Client-Side JavaScript Validator only validates client-side JavaScript, i.e. the stuff in web pages. What you want to do is put jQuery into a folder you designate as a Library folder rather than a Source folder (Libraries don't get validated by the JavaScript Validator builder [you'll see it on the project's Properties dialog's Builder page]). If you need to, you can exclude a subfolder of your Source folder in your project's JavaScript Include Path to carve out a spot for a Library folder.

like image 98
nitind Avatar answered Nov 03 '22 04:11

nitind