Bug 352430

Summary: [quick fix][1.7] Provide quick fix to infer type from RHS if LHS is empty diamond construct
Product: [Eclipse Project] JDT Reporter: Ankur Sharma <ankur_sharma>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Ankur Sharma CLA 2011-07-19 05:50:44 EDT
Snippet


ArrayList<> list = new ArrayList<String>();

The line is correctly shown with error. However, a quickfix would be great which fills in the type from RHS (if available). Such a quickfix is available if there are no empty diamond constructs, that is,

ArrayList list = new ArrayList<String>();



Eclipse Build: I20110613-1736 with Java 7 patch
Comment 1 Ankur Sharma CLA 2011-07-19 05:57:20 EDT
Or the quickfix can simply suggest to remove the empty diamond from LHS.
Comment 2 Dani Megert CLA 2011-07-19 06:03:17 EDT
We can probably just reuse the existing quick fix.