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

Bug 369342

Summary: [content-assist] No method proposals if function has fields
Product: [WebTools] JSDT Reporter: Jacek Pospychala <jacek.pospychala>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: RESOLVED WORKSFORME QA Contact: Chris Jaun <cmjaun>
Severity: normal    
Priority: P3 CC: cmjaun
Version: 3.3   
Target Milestone: 3.5.1   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
patch none

Description Jacek Pospychala CLA 2012-01-22 15:08:20 EST
If a function has properties, it doesn't show in C-A proposals list. For example:

function $(selector) {
  // ...
  return jQueryObject;
}

$.trim = function(txt) {
  // ...
  return trimmedTxt;
}

Using content assist after "$" will generate a list with single type proposal "$", but not with function proposal.

I'd expect:

$|
- proposal "$(selector)"

$.|
- proposal "$.trim(txt)"
Comment 1 Jacek Pospychala CLA 2012-01-27 05:02:42 EST
hm I was too hurry.. it seems a simpler case doesn't work either, e.g.:

Date.p| <-- use content-assist here to get "parse()" method

No proposals found..
Comment 2 Jacek Pospychala CLA 2012-02-01 03:56:17 EST
Created attachment 210357 [details]
patch

I was able to fix my original issue by reverting some change related to bug 351448
Comment 3 Chris Jaun CLA 2013-08-30 16:58:35 EDT
This is working in WTP 3.5.1.