【问题标题】:Code fold bug in eclipse for JS?Eclipse中JS的代码折叠错误?
【发布时间】:2012-01-25 15:25:40
【问题描述】:

我有这个代码

/**
* @file core.js 
* @brief this file contains the basics of the frame work 
*
* @author David Garcia
*
* @date 11/08/1983
*/
(function(){

    window.onerror = function (sMessage, sUrl, sLine) {
        alert("An error occurred at " + sUrl + "\nLine Number: " + sLine + '\n\n' + sMessage);
        return true;
    };

    /**
     * IE fix
     */
    function ieFix(){
        if(typeof window.XMLHttpRequest === 'undefined' &&
            typeof window.ActiveXObject === 'function') {
            window.XMLHttpRequest = function() {
                try { return new ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch(e) {}
                try { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch(e) {}
                return new ActiveXObject('Microsoft.XMLHTTP');
            };
        }
    }   
})();

我无法折叠(折叠)cmets 和函数,但如果我使用此代码:

 /**
    * @file core.js 
    * @brief this file contains the basics of the frame work 
    *
    * @author David Garcia
    *
    * @date 11/08/1983
    */

window.onerror = function (sMessage, sUrl, sLine) {
            alert("An error occurred at " + sUrl + "\nLine Number: " + sLine + '\n\n' + sMessage);
            return true;
        };

        /**
         * IE fix
         */
        function ieFix(){
            if(typeof window.XMLHttpRequest === 'undefined' &&
                typeof window.ActiveXObject === 'function') {
                window.XMLHttpRequest = function() {
                    try { return new ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch(e) {}
                    try { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch(e) {}
                    return new ActiveXObject('Microsoft.XMLHTTP');
                };
            }
        }

是一个错误或错误的配置。

Eclipse 版本:Indigo Service Release 1。 内部版本号:20110916-0149。 插件:Javascript IDE 1.4.1.20110303-1818

【问题讨论】:

    标签: javascript eclipse collapse folding


    【解决方案1】:

    还有其他插件可以解决这个Spket

    【讨论】:

      猜你喜欢
      • 2013-03-19
      • 2011-10-15
      • 2011-07-23
      • 2012-01-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-29
      • 2011-06-21
      相关资源
      最近更新 更多