I actually like MY JavaScript files to be validated, but I definitely don't want to validate and deal with trivial warnings with third party libraries.
That's why I think that turning off validation all together is too drastic. Fortunately with Eclipse Indigo ( 3.7 ) you can selectively remove some JavaScript sources from validation.
1. Right click your project
2. Select Properties -> JavaScript -> Include Path
3. Select Source tab. ( It looks identical to Java Build Path Source tab )
4. Expand JavaScript source folder
5. Highlight Excluded pattern
6. Click Edit button
7. Click Add button next to Exclusion patterns box.
8. You may either type Ant-style wildcard pattern, or click Browse button to mention the JavaScript source by name.
[img]http://dl.iteye.com/upload/attachment/0082/2194/bb72517a-9293-38e8-8802-1b799b61f383.png[/img]
The information about JavaScript source inclusion/exclusion is saved into .settings/.jsdtscope file. Do not forget to add it to your SCM.
Here is how configuration looks with jquery files removed from validation
You can define project specific settings for validation. See pictures below:
Click on client side Javascript alt text
[img]http://dl.iteye.com/upload/attachment/0082/2200/b100b014-59b6-3313-80cb-403a5dfead3a.png[/img]
Click on "add exclude group" and then "add rule" in exclude group. Then pick "Folder or file name", and specify "jquery.js". This should work.
[img]http://dl.iteye.com/upload/attachment/0082/2202/b17111f5-e3df-30eb-8914-b4e078f2d164.png[/img]
This setting can be committed into source control as well.
That's why I think that turning off validation all together is too drastic. Fortunately with Eclipse Indigo ( 3.7 ) you can selectively remove some JavaScript sources from validation.
1. Right click your project
2. Select Properties -> JavaScript -> Include Path
3. Select Source tab. ( It looks identical to Java Build Path Source tab )
4. Expand JavaScript source folder
5. Highlight Excluded pattern
6. Click Edit button
7. Click Add button next to Exclusion patterns box.
8. You may either type Ant-style wildcard pattern, or click Browse button to mention the JavaScript source by name.
[img]http://dl.iteye.com/upload/attachment/0082/2194/bb72517a-9293-38e8-8802-1b799b61f383.png[/img]
The information about JavaScript source inclusion/exclusion is saved into .settings/.jsdtscope file. Do not forget to add it to your SCM.
Here is how configuration looks with jquery files removed from validation
You can define project specific settings for validation. See pictures below:
Click on client side Javascript alt text
[img]http://dl.iteye.com/upload/attachment/0082/2200/b100b014-59b6-3313-80cb-403a5dfead3a.png[/img]
Click on "add exclude group" and then "add rule" in exclude group. Then pick "Folder or file name", and specify "jquery.js". This should work.
[img]http://dl.iteye.com/upload/attachment/0082/2202/b17111f5-e3df-30eb-8914-b4e078f2d164.png[/img]
This setting can be committed into source control as well.
本文介绍如何在Eclipse Indigo中选择性地排除某些JavaScript源文件不进行验证,例如排除第三方库如jQuery等,以减少不必要的警告信息。通过简单的步骤设置,可以提高开发效率。
1万+

被折叠的 条评论
为什么被折叠?



