Bug 44964 - Rename doesn't work if there are any compilation errors
Summary: Rename doesn't work if there are any compilation errors
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M6   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 42253
Blocks:
  Show dependency tree
 
Reported: 2003-10-15 18:37 EDT by Brett Kotch CLA
Modified: 2006-02-27 06:50 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brett Kotch CLA 2003-10-15 18:37:31 EDT
Type in the following code:

		int abc = 0;
		if (true) {
			 System.out.println(abc)
		}

Try to rename abc. It will fail because system.out.println doesn't have a 
semicolon. I should be allowed to rename even if there are comilation errors.
Comment 1 Martin Aeschlimann CLA 2003-10-16 06:06:24 EDT

*** This bug has been marked as a duplicate of 44983 ***
Comment 2 Frederic Fusier CLA 2006-02-15 11:05:28 EST
Verified for 3.2 M5 using build I20060215-0010.
Comment 3 Frederic Fusier CLA 2006-02-15 11:11:50 EST
Even with bug 42253 fixed, I still cannot rename the local variable.
I get following "Rename Local Variable" error dialog:
"A local variable  declaration or reference  must be selected to activate this refactoring"

Adding missing semicolon of course open correctly the refactoring dialog and local variable is the same than without semicolon => seems not to be a robust AST issue => Reopen as this is not a duplicate bug
Comment 4 Frederic Fusier CLA 2006-02-15 11:29:54 EST
Not a duplicate but depended on bug 42253
Comment 5 Martin Aeschlimann CLA 2006-02-16 05:23:09 EST
I would suggest to use an AST with recovery but unly for the rename local case.
Comment 6 Markus Keller CLA 2006-02-27 06:50:47 EST
Fixed for rename local variable.