首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >eclipse for JS中的代码折叠错误?

问eclipse for JS中的代码折叠错误?
EN

Stack Overflow用户
提问于 2011-12-22 04:55:41
回答 1查看 735关注 0票数 0

我有这个代码

代码语言:javascript
复制
/**
* @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');
            };
        }
    }   
})();

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

代码语言:javascript
复制
 /**
    * @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。内部版本id: 20110916-0149.插件: Javascript IDE 1.4.1.20110303-1818

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-12-22 06:41:51

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8596222

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档