Bug 344127 - [content assist] Objects declared in Global scope not showing up in content assist
Summary: [content assist] Objects declared in Global scope not showing up in content a...
Status: RESOLVED WORKSFORME
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.2.4   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: Future   Edit
Assignee: Chris Jaun CLA
QA Contact: Chris Jaun CLA
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2011-04-28 09:50 EDT by Chris Jaun CLA
Modified: 2013-10-24 10:53 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.