Bug 387984

Summary: [content assist] Content assist is not return type aware for array-returning methods and new
Product: [Eclipse Project] JDT Reporter: Ole Jørgen <olejorgenb>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, markus.kell.r
Version: 4.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 261315, 277691    
Bug Blocks:    

Description Ole Jørgen CLA 2012-08-24 09:20:51 EDT
public GenericStuff[] getAllMyStuff() {
   // ...
   return new GS<ctrl-space>
}

Does not (always*) suggest GenericStuff as first hit. I'm quite sure I've experienced this with normal (non-camelcase) content assist too)

* Couldn't find an example that worked with only SDK classes. With my setup I get lots of classes from org.apache.* as "superior" suggestions.
Comment 1 Dani Megert CLA 2012-08-27 06:50:57 EDT
We boost proposals that got used before i.e. which are in our LRU cache. That's why you can see different behavior. In addition we do not yet use the LRU cache for constructor proposals (see bug 261315).

*** This bug has been marked as a duplicate of bug 261315 ***
Comment 2 Markus Keller CLA 2013-11-20 06:07:01 EST
Bug 261315 is about fixing relevance of constructor proposals. But this example doesn't involve constructor proposals. It's about array creation proposals.

After bug 261315/bug 277691 is fixed, we have to see if we want to add similar support for array creations.