Bug 44811

Summary: [introduce parameter] Should allow to select local variable declaration [refactoring]
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: deepakazad, lrozenblyum, markus.kell.r, thorbjoern
Version: 3.0Keywords: bugday, helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Martin Aeschlimann CLA 2003-10-14 09:08:46 EDT
20031014

In this code:
	public void createPropertyList(StringBuffer buf) throws Exception {
		HashMap properties= getPropertyList();
		
		StringBuffer buf= new StringBuffer();
		buf.append("***************************");
		buf.append("xxx");
	
I want to make buf a parameter. If I select 'new StringBuffer()' this works, but
it would introduce a new variable (e.g. buffer) and the code would look like that:
		StringBuffer buf= buffer;
Couldn't it take 'buf' right away?
Comment 1 Markus Keller CLA 2004-06-09 03:59:16 EDT
Not for 3.0, but it's a valid enhancement request.
Comment 2 Martin Aeschlimann CLA 2006-10-17 03:33:48 EDT
*** Bug 160847 has been marked as a duplicate of this bug. ***
Comment 3 Deepak Azad CLA 2010-09-05 13:54:41 EDT
*** Bug 118215 has been marked as a duplicate of this bug. ***
Comment 4 leokom leokom CLA 2016-06-10 06:12:28 EDT
It's really nice to have this done. It has been assigned for a long time. any ideas when it's ready? (in Intellij IDEA it works)