Bug 139674

Summary: [quick fix] Create field if 'Assignment has no effect'
Product: [Eclipse Project] JDT Reporter: Benno Baumgartner <benno.baumgartner>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Benno Baumgartner CLA 2006-05-02 09:40:29 EDT
3.2. RC2

Given:
public void set(int i) {
   i= i;
}

Warning at i= i; 'Assignment has no effect'
1. Ctrl-1
Is:
  None available
Should:
  'Create field 'i''

Given a field 'k' and an assignment 'k= k;' offers a quick fix 'Create parameter 'k'' which is IMHO a less common use case then the other way around (top down). 

Use case: Create method (with quick fix), go there, write assignment, create field, go there, create getter, ...