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

Bug 349274

Summary: [content assist][1.7] content assist should work for diamond
Product: [Eclipse Project] JDT Reporter: Raksha Vasisht <raksha.vasisht>
Component: TextAssignee: Dani Megert <daniel_megert>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: amj87.iitr, daniel_megert, deepakazad, markus.kell.r
Version: 3.7   
Target Milestone: 3.7.1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 351444    
Bug Blocks:    
Attachments:
Description Flags
Fix (depends on JDT Core changes) none

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.