Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349274 - [content assist][1.7] content assist should work for diamond
Summary: [content assist][1.7] content assist should work for diamond
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: 3.7.1   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 351444
Blocks:
  Show dependency tree
 
Reported: 2011-06-14 03:08 EDT by Raksha Vasisht CLA
Modified: 2011-08-02 05:45 EDT (History)
4 users (show)

See Also:


Attachments
Fix (depends on JDT Core changes) (16.21 KB, patch)
2011-07-13 05:30 EDT, Dani Megert CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Raksha Vasisht CLA 2011-06-14 03:08:05 EDT
BETA_JAVA7

void foo() {
      HashMap<String, ArrayList<?>> field= new HashMap | content assist here
      
}

results in :

HashMap<String, ArrayList<?>> field= new HashMap<String, ArrayList<?>>();

should be :

HashMap<String, ArrayList<?>> field= new HashMap<>();
Comment 1 Deepak Azad CLA 2011-06-14 04:46:50 EDT

*** This bug has been marked as a duplicate of bug 283950 ***
Comment 2 Dani Megert CLA 2011-07-07 10:02:29 EDT
Not a dup. Constructor completion with diamond is a separate issue.
Comment 3 Deepak Azad CLA 2011-07-07 11:00:37 EDT
So the idea is to insert <> where we can in 1.7 mode ? 

I think it would be nice if once we insert the (best guessed) type arguments by default, we enter linked mode on the type arguments and suggest alternatives in the linked mode popup. Something like what currently happens for method arguments...
Comment 4 Dani Megert CLA 2011-07-07 11:13:13 EDT
(In reply to comment #3)
> So the idea is to insert <> where we can in 1.7 mode ? 
Yes.
Comment 5 Dani Megert CLA 2011-07-13 05:30:38 EDT
Created attachment 199552 [details]
Fix (depends on JDT Core changes)
Comment 6 Dani Megert CLA 2011-07-14 03:41:41 EDT
Fixed in BETA_JAVA7.
Comment 7 Ayushman Jain CLA 2011-07-20 03:58:17 EDT
Verified using JDT feature patch v20110714-1300.