Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350559 - [1.7] propose diamond when completing allocation expression
Summary: [1.7] propose diamond when completing allocation expression
Status: CLOSED DUPLICATE of bug 351444
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: Other Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-28 07:36 EDT by Stephan Herrmann CLA
Modified: 2011-07-07 10:03 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 Stephan Herrmann CLA 2011-06-28 07:36:38 EDT
While playing with the example from bug 343693 I noticed that
  new X|
completes to
  new X<T>(param)

This happens even if T is not in scope, creating bogus code 
(i.e., both parameters T and param must be manually specified).

Moreover, if a bound is added to T, say "T extends Number",
completion proposes
  new X<Number>(param)

Wouldn't it be educative for users if we propose the new syntax
  new X<>(param)

?

Please excuse, if this has been discussed before.
Comment 1 Deepak Azad CLA 2011-06-28 08:37:23 EDT
A more general solution is proposed in bug 283950. (Note that JDT/Core only proposes the types, the type arguments are inserted by JDT/Text)

*** This bug has been marked as a duplicate of bug 283950 ***
Comment 2 Dani Megert CLA 2011-07-07 10:03:01 EDT

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