eclipse项目里javascript总是验证,且出现最多的error是 "Description Resource Path Location Type Syntax error on toke
2016-04-12 11:09
633 查看
解决方法:
1.可能之前安装了JSHint,那先在eclipse->Help->Installation Details里面卸载(Uninstall...)
2.* Right Click Project =>
Build Path =>
Configure Build Path =>
Builders
* In the right hand side , make sure JavaScript Validator is Unchecked, if not uncheck it.
3.I removed the tag in the .project .
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
It's worked very well for me.
说明:只要是含有javascriptValidator这个关键字的buildCommand就移除,比如我的buildCommand是这样的
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value><project>/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator (1).launch</value>
</dictionary>
</arguments>
</buildCommand>
4.* Open your project's .project file in a text editor.
* Remove the line <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
* Refresh your project
5.* Right click your project
* Select Properties -> JavaScript -> Include
* Select Source tab (It looks similar to the Java Build Path Source tab)
* Expand source folder
* Highlight Excluded pattern
* Click Edit button
* Click Add button next to Exclusion patterns box.
* Click Browse button and select the JavaScript source by name.
6.Window > Preferences… > JavaScript > Validator > Errors/Warnings and uncheck the box.
7.操作完上面的步骤之后,在Problems透视图里面还有Errors,那我们要手动删除这些Errors,然后刷新一下项目,再Project=>Clean一下就OK了
1.可能之前安装了JSHint,那先在eclipse->Help->Installation Details里面卸载(Uninstall...)
2.* Right Click Project =>
Build Path =>
Configure Build Path =>
Builders
* In the right hand side , make sure JavaScript Validator is Unchecked, if not uncheck it.
3.I removed the tag in the .project .
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
It's worked very well for me.
说明:只要是含有javascriptValidator这个关键字的buildCommand就移除,比如我的buildCommand是这样的
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value><project>/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator (1).launch</value>
</dictionary>
</arguments>
</buildCommand>
4.* Open your project's .project file in a text editor.
* Remove the line <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
* Refresh your project
5.* Right click your project
* Select Properties -> JavaScript -> Include
* Select Source tab (It looks similar to the Java Build Path Source tab)
* Expand source folder
* Highlight Excluded pattern
* Click Edit button
* Click Add button next to Exclusion patterns box.
* Click Browse button and select the JavaScript source by name.
6.Window > Preferences… > JavaScript > Validator > Errors/Warnings and uncheck the box.
7.操作完上面的步骤之后,在Problems透视图里面还有Errors,那我们要手动删除这些Errors,然后刷新一下项目,再Project=>Clean一下就OK了
相关文章推荐
- JQuery1——基础($对象,选择器,对象转换)
- Android学习笔记(二九):嵌入浏览器
- Android java 与 javascript互访(相互调用)的方法例子
- JavaScript演示排序算法
- javascript实现10进制转为N进制数
- MyEclipse Web Project转Eclipse Dynamic Web Project
- Windows Clang开发环境备忘
- 最后一次说说闭包
- Ajax
- 2019年开发人员应该学习的8个JavaScript框架
- HTML中的script标签研究
- 对一个分号引发的错误研究
- 异步流程控制:7 行代码学会 co 模块
- ES6 走马观花(ECMAScript2015 新特性)
- JavaScript拆分字符串时产生空字符的原因
- Canvas 在高清屏下绘制图片变模糊的解决方法
- Redux系列02:一个炒鸡简单的react+redux例子