Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341979 - [extract local] generated variable isn't put in front of all the occurrences
Summary: [extract local] generated variable isn't put in front of all the occurrences
Status: CLOSED DUPLICATE of bug 65875
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-06 02:19 EDT by Jerry Mising name CLA
Modified: 2011-10-18 22:12 EDT (History)
1 user (show)

See Also:


Attachments
highlight the expression to be extracted (4.98 KB, image/png)
2011-04-06 02:20 EDT, Jerry Mising name CLA
no flags Details
select Extract Local Variable (19.88 KB, image/png)
2011-04-06 02:21 EDT, Jerry Mising name CLA
no flags Details
the variable is defined after its first usage (30.68 KB, image/png)
2011-04-06 02:23 EDT, Jerry Mising name CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jerry Mising name CLA 2011-04-06 02:19:50 EDT
Build Identifier: 20110218-0911

I want to extract a variable to hold table.getTr() when I'm typing:
System.out.println(table.gtTr());
table.getTr();

The generated variable should be put in front of the 2 occurrences, not in between.

Reproducible: Always

Steps to Reproduce:
See the attachments for details.
Comment 1 Jerry Mising name CLA 2011-04-06 02:20:45 EDT
Created attachment 192614 [details]
highlight the expression to be extracted
Comment 2 Jerry Mising name CLA 2011-04-06 02:21:50 EDT
Created attachment 192615 [details]
select Extract Local Variable
Comment 3 Jerry Mising name CLA 2011-04-06 02:23:20 EDT
Created attachment 192616 [details]
the variable is defined after its first usage
Comment 4 Deepak Azad CLA 2011-10-18 22:12:26 EDT

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