This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 214064

Summary: Code folding in Javascript objects and private methods
Product: javascript Reporter: felipenmoura
Component: EditorAssignee: Petr Pisl <ppisl>
Status: NEW ---    
Severity: normal CC: SomeName123
Priority: P2    
Version: 7.1.1   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description felipenmoura 2012-06-12 17:53:58 UTC
Product Version = NetBeans IDE 7.1.1 (Build 201203012225)
Operating System = Linux version 3.0.0-17-generic running on amd64
Java; VM; Vendor = 1.6.0_26
Runtime = Java HotSpot(TM) 64-Bit Server VM 20.1-b02

Hello.
The issue I see, that is something usegul that could exist is the code folding for Javascript private variables. Also, object descriptions.
Like this:


var Human= (function(){
    // private variables
    var name= 'mary';
    var props= {
        height: '1.68m',
        numberOfEyes: 2,
        age: 72
    }

    var run= function(){
        // private method run
    };

    return {
        getName: function(){
            return name;
        },
        getAge: function(){
            return props.age;
        }
    };
})();

In that code, nothing can be folded! Neither the declared objects nor functions...not even the line "var Human= (function(){" can fold anything!