eclipse徹底去除validation(徹底解決編輯js文件的卡頓問題)


Eclipse中默認的JS編輯器非常慢,尤其在拷貝粘貼代碼時,CPU總是占用很高甚至到100%,也就導致了編輯起來很卡。

這是因為Eclipse中帶的Validate功能導致的,這個雞肋的功能簡直讓人抓狂。

試過在菜單和項目屬性中修改Validation相應的配置項都不起作用,最后發現需要修改項目根目錄下的.project文件才能徹底解決編輯JS文件的卡頓問題。

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>integrate-base-web</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
            <triggers>full,incremental,</triggers>
            <arguments>
                <dictionary>
                    <key>LaunchConfigHandle</key>
                    <!-- <value>&lt;project&gt;/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch</value> -->
                </dictionary>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.wst.common.project.facet.core.builder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
            <triggers>full,incremental,</triggers>
            <arguments>
                <dictionary>
                    <key>LaunchConfigHandle</key>
                    <!-- <value>&lt;project&gt;/.externalToolBuilders/org.eclipse.wst.validation.validationbuilder.launch</value> -->
                </dictionary>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.m2e.core.maven2Builder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
        <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
        <nature>org.eclipse.jdt.core.javanature</nature>
        <nature>org.eclipse.m2e.core.maven2Nature</nature>
        <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
        <!-- <nature>org.eclipse.wst.jsdt.core.jsNature</nature> -->
    </natures>
</projectDescription>

上面貼出來的代碼中的注釋部分就是要去掉的Validation配置項部分。

去掉之后整個世界都清凈了。

 

"原來忍住一段時間不聯系了,就真的不聯系了。"


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM