Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 62836 - "Converrt local variable to field" refactoring does not update Members view.
Summary: "Converrt local variable to field" refactoring does not update Members view.
Status: RESOLVED DUPLICATE of bug 62854
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: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-18 22:59 EDT by Gary Gregory CLA
Modified: 2004-05-21 10:21 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 Gary Gregory CLA 2004-05-18 22:59:43 EDT
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.
Comment 1 Olivier Thomann CLA 2004-05-19 09:42:23 EDT
Move to JDT/UI
Comment 2 Dirk Baeumer CLA 2004-05-19 12:03:10 EDT
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.
Comment 3 Gary Gregory CLA 2004-05-19 13:38:45 EDT
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?
Comment 4 Dirk Baeumer CLA 2004-05-20 12:17:00 EDT
Gary, please log a separate PR for the Ctrl+Z issue.
Comment 5 Gary Gregory CLA 2004-05-20 14:46:49 EDT
Done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=63286
Comment 6 Dirk Baeumer CLA 2004-05-21 10:21:10 EDT

*** This bug has been marked as a duplicate of 62854 ***