Bug 262932 - [assist] Constructor completion makes array allocation difficult
Summary: [assist] Constructor completion makes array allocation difficult
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M6   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-29 12:24 EST by Darin Wright CLA
Modified: 2009-03-10 09:50 EDT (History)
2 users (show)

See Also:


Attachments
Proposed fix (16.70 KB, patch)
2009-02-04 11:14 EST, David Audel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2009-01-29 12:24:58 EST
With the new constructor completion support in code assist, it is difficult to create expressions like:

new Some|thing[]{...<seed the array>...}

(i.e. code assist at the '|')

I can no longer get code assist to just complete the type name - I always have to choose from constructors. Is there a setting I'm missing?
Comment 1 Dani Megert CLA 2009-01-30 09:06:40 EST
Right, in that case we should also see types. Moving to JDT Core.
Comment 2 David Audel CLA 2009-02-04 11:14:18 EST
Created attachment 124690 [details]
Proposed fix

With patch types are also proposed when the expected type in an array.

eg.
X[] x = new Y|

eg.

void foo(X[] x) {
  foo(new Y|

eg.
X[] foo() {
  return new Y|

I can not compute types hierarchies (too costly) so i can not propose only subtypes of X.
Comment 3 David Audel CLA 2009-02-04 11:17:47 EST
Released for 3.5M6

Tests added
  CompletionTests#testConstructor1() -> testConstructor6()
Comment 4 Olivier Thomann CLA 2009-03-10 09:50:57 EDT
Verified for 3.5M6 using I20090310-0100.