Bug 344127

Summary: [content assist] Objects declared in Global scope not showing up in content assist
Product: [WebTools] JSDT Reporter: Chris Jaun <cmjaun>
Component: GeneralAssignee: Chris Jaun <cmjaun>
Status: RESOLVED WORKSFORME QA Contact: Chris Jaun <cmjaun>
Severity: normal    
Priority: P3 CC: devfuture, wooyoung1.cho
Version: 3.2.4Keywords: needinfo
Target Milestone: Future   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Chris Jaun CLA 2011-04-28 09:50:24 EDT
I created a JavaScript project with default settings.
I created a sub-folder called "main"
I created a JS file in "main" called main.js
I added the following code:

$ = {};
$.add = function(a, b) {
	return a + b;
};
$.subtract = function(a, b) {
	return a - b;
};

I created a second, top-level, file, script.js
With main.js closed I attempt content assist in script.js

$.*

I get no proposals.

If I modify main.js to declare the object using the following syntax then content assist works...

var $ = {};
Comment 1 Nitin Dahyabhai CLA 2011-04-28 13:24:58 EDT
Is it any object, or just $?
Comment 2 Vitaliy n/a CLA 2012-04-03 17:19:19 EDT
it is any object...

file1.js:

var Vari = {...};
Vari.net = {...};

file2.js:

Vari.* 

no proposals, project from mercurial repo, facets with javascript...


Eclipse 4.2.0.v20120221-1643-7T7mA7F8Yx_bihek25wA9-Kyh17YZ1fpg9XKfBh01yaN8
Build id: I20120315-1300

JSDT 1.4.0.v201111090639-7G7DFciFC7sRelSOcldK09
Comment 3 Chris Jaun CLA 2013-10-24 10:53:27 EDT
This is working correctly in 3.6 builds.