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

Bug 184558

Summary: [extract method] Provide more data when it's ambiguous
Product: [Eclipse Project] JDT Reporter: Robert Konigsberg <konigsberg>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: markus.kell.r
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Robert Konigsberg CLA 2007-04-27 22:54:01 EDT
Build ID: I20070323-1616

Steps To Reproduce:
Create the following class

public class X {
  public static void main(String[] args) {
    int x; int y;
    x = 1; y = 2; // THIS LINE
    System.out.println(x + y);
  }
}

Select the line marked "THIS LINE" and refactor/extract method.

More information:
Eclipse correctly response with "Ambiguous return value: selected block contains more than one assignment to local variable.

It would be helpful it the dialog box listed the modified local variables.
Comment 1 Markus Keller CLA 2009-06-21 16:58:58 EDT

*** This bug has been marked as a duplicate of bug 50607 ***