Bug 352430 - [quick fix][1.7] Provide quick fix to infer type from RHS if LHS is empty diamond construct
Summary: [quick fix][1.7] Provide quick fix to infer type from RHS if LHS is empty dia...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-19 05:50 EDT by Ankur Sharma CLA
Modified: 2011-07-19 06:04 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.