Bug 64166 - Local variable rename fails in 3M9 code assist [quick assist]
Summary: Local variable rename fails in 3M9 code assist [quick assist]
Status: CLOSED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 RC2   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2004-05-26 12:49 EDT by Bart Geraci CLA
Modified: 2009-08-30 02:07 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 Bart Geraci CLA 2004-05-26 12:49:45 EDT
Create a method with at least 2 local variables, which are referenced in the
method several times.
Select one via code assist and it says "Rename in file".
It works the first time.
Don't save the file.
Select second variable, and it doesn't highlight the other references and
renaming only changes the instance and not the other references.
Save the file.
Select second variable and it still doesn't highlight the other references and
renaming only changes the instance and not the other references.
Close the file and reopen it.
Select the second variable and it works now.

Alt-Shift-R does work without needing to save or reload the file.
Comment 1 Dirk Baeumer CLA 2004-06-03 06:06:15 EDT
to be invetigated
Comment 2 Martin Aeschlimann CLA 2004-06-03 09:00:33 EDT
can't reproduce. Please add a code example where this happends.
My example was:
public class A {
	private void foo() {
		int loc1;
		int loc2;
		
		loc1= 0;
		loc2= 0;
		loc2 += loc1;
	}

}
Comment 3 Bart Geraci CLA 2004-06-03 15:56:06 EDT
I used the same code as yours. And I'm still getting the error.

If I don't save the file after doing a local variable rename, then 
I can't do another local variable rename using the Content-Assist.

When I call Refactor / Rename local variables, it will work reliably
Comment 4 Martin Aeschlimann CLA 2004-06-04 04:09:23 EDT
Strange, it really works for me. What build are you using?
Do you have more precice steps? These are mine
- Select the first local variable with a doubleclick
- CTRL + 1, Rename in file
- Enter 'a' as new name
- Double click on second local variable, CTRL + 1, Rename in local
- All occurences of 'loc2' are linked
Comment 5 Bart Geraci CLA 2004-10-04 14:02:31 EDT
As of 3.1M2, the problem is fixed, so I'm closing this bug.
Comment 6 Denis Roy CLA 2009-08-30 02:07:53 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.