Community
Participate
Working Groups
Version 3.0.m8. In the Java Browsing perspective: - Create a local var like: private void execute(File requestFile) throws IOException { if (!requestFile.exists()) { throw new IOException("The request file does not exist: " + requestFile); } String requestText = FileUtils.readFileToString(requestFile, "UTF-8"); } - Select the requestText local var in a private method. - Right-click on the local var name (requestText) in the decl and choose the "Converrt local variable to field" refactoring. - I changed the name from "text" to "requestText" (annoying), clicked Preview, clicked Ok. Now the Members pane does NOT show the new ivar. Ctrl-S save does not update. Make a change, then Save and the new ivar shows up.
Move to JDT/UI
Gary, I am not able to reproduce this using I200405190010. Did you have anything in the log file ? BTW: the (annoying) text proposal is now fixed. You get requestText.
Crud, now I cannot reproduce it either. What I did notice though is that if you try to undo (Ctrl-Z) the refactoring, you must Undo about 5-10 times, I assume once for each internal step. I was expecting that one Undo would undo it all. Shall I log this separately?
Gary, please log a separate PR for the Ctrl+Z issue.
Done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=63286
*** This bug has been marked as a duplicate of 62854 ***