eclipse for JS中的代码折叠错误

Code fold bug in eclipse for JS?

本文关键字:代码 折叠 错误 for JS eclipse      更新时间:2023-09-26

我有这样的代码

/**
* @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');
            };
        }
    }   
})();

我不能折叠(折叠)注释和函数但是如果我使用下面的代码:

 /**
    * @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 Version: Indigo Service Release 1。Build id: 20110916-0149插件:Javascript IDE 1.4.1.20110303-1818

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