Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333714

Summary: [content assist] Classes are not properly scoped
Product: [WebTools] JSDT Reporter: Eugene Ostroukhov <eostroukhov>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: NEW --- QA Contact: Chris Jaun <cmjaun>
Severity: normal    
Priority: P3    
Version: 3.2.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Eugene Ostroukhov CLA 2011-01-06 19:13:09 EST
1. (Expected behavior) I do not have "myfunction()" function visible in the global scope code assist if I write it in anonymous scope:
(function() {
    function myfunction() {
        return 1;
    }
})();

2. (Wrong behavior) I will see "myfunction" class (and its property) in code assist if I change the code to:
(function() {
    function myfunction() {
        this.aproperty = 1;
    }
})();

Note: browser does not see this class in the global scope.