Myeclipse对Javascript的检测特别不习惯,有时候JS文件里面加着struts代码,就会报错。只能禁用JavaScript检查功能了。

在MyEclipse的Project目录下有一个隐藏文件.project,这个文件放着一些project的配置

我直接贴出来吧,将以下的删除即可。

<buildcommand>
    <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
    <arguments>
    </arguments>
</buildcommand>

<nature>org.eclipse.wst.jsdt.core.jsNature</nature>

具体情况可见该文件。这样重启MyEclipse就不会启用Javascript检查功能了。

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>trybest</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.wst.common.project.facet.core.builder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.wst.validation.validationbuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder</name>
            <arguments>
            </arguments>
            </buildCommand>
    </buildSpec>
    <natures>
        <nature>com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature>
        <nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
        <nature>org.eclipse.jdt.core.javanature</nature>
        <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
        <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
        <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
    </natures>
</projectDescription>

声明:未经允许禁止转载 东东东 陈煜东的博客 文章,谢谢。如经授权,转载请注明: 转载自东东东 陈煜东的博客

本文链接地址: MyEclipse禁用JavaScript检查功能 – https://www.chenyudong.com/archives/myeclipse-disable-javascript-validatation.html