Bug 197873 - [inline] Inline local variable should work with multiple assignments
Summary: [inline] Inline local variable should work with multiple assignments
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-25 16:32 EDT by Daniel Aborg CLA
Modified: 2007-07-26 11:38 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Aborg CLA 2007-07-25 16:32:57 EDT
Build ID: I20070621-1340 

Steps To Reproduce:

int i;
i = 1;
System.out.println(i);
i = 2;
System.out.println(i);
i = 3;
System.out.println(i);

Inlining i of "i = 2;" or the statement after should produce:

int i;
i = 1;
System.out.println(i);
System.out.println(2);
i = 3;
System.out.println(i);

Now inlining i of "int i;" or one of the two statements after that should produce:

System.out.println(1);
System.out.println(2);
int i = 3;
System.out.println(i);
Comment 1 Martin Aeschlimann CLA 2007-07-26 04:39:54 EDT
Is this a common scenario for a variable that is inlined? I don't think so... 
Comment 2 Daniel Aborg CLA 2007-07-26 11:38:40 EDT
Fairly common if you're cleaning up code, a task where good support from the IDE is hugely appreciated. IntelliJ IDEA has exactly this feature, which is fantastic when you're coding.

I can't tell you what the priorities is for Eclipse or what kind of IDE you want it to be, but this is the kind of features I personally value in the IDEs I like to use.