Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324690 - [Content Assist] No parameters populated for constructor in a package defined in a different file
Summary: [Content Assist] No parameters populated for constructor in a package defined...
Status: CLOSED DUPLICATE of bug 306958
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Project Inbox CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-07 15:29 EDT by Ian Tewksbury CLA
Modified: 2010-09-14 14:08 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 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 ***