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

Bug 341979

Summary: [extract local] generated variable isn't put in front of all the occurrences
Product: [Eclipse Project] JDT Reporter: Jerry Mising name <commer>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: minor    
Priority: P3 CC: deepakazad
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
highlight the expression to be extracted
none
select Extract Local Variable
none
the variable is defined after its first usage none

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 ***