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

Bug 324690

Summary: [Content Assist] No parameters populated for constructor in a package defined in a different file
Product: [WebTools] JSDT Reporter: Ian Tewksbury <itewksbu>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: CLOSED DUPLICATE QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: cmjaun, mauromol
Version: 3.2   
Target Milestone: 3.2.3   
Hardware: All   
OS: All   
Whiteboard:

Description Ian Tewksbury CLA 2010-09-07 15:29:58 EDT
This bug stems from bug 306958 for the one case the fix provided there does not fix.  This case is mentioned in bug 306958 comment 7.

The case is to define a constructor in one file in a package and then use it in another without first specifying the package.

Example:

File1.js
-----
bar.Class1 = function(a, b) {};
bar.Class1.prototype = new Object();
-----

File2.js
-----
new Cla|
-----

Invoking content assist at the | will not yield the constructor suggestion with parameters that is expected based on the definition defined in File1.js.

This is only a problem in a separate file because in a local file the local type is searched where as when invoking in a separate file a query is performed and it has trouble matching "Cla" with "bar.Class1(a, b)".  I do not remember the specifics of my findings but I remember this was a none-trivial issue to fix so rather then delay the rest of bug 306958 I have moved this one problem to this bug.
Comment 1 Ian Tewksbury CLA 2010-09-14 14:08:11 EDT
Duplicating this against Bug 306958 because bug 306958 has not made it in yet so there is no need for two different bugs.

*** This bug has been marked as a duplicate of bug 306958 ***