Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312605 - [rename] Read-only files are not warned about in a specific case
Summary: [rename] Read-only files are not warned about in a specific case
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-12 08:54 EDT by David Witherspoon CLA
Modified: 2010-05-12 10:46 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Witherspoon CLA 2010-05-12 08:54:30 EDT
Build Identifier: 20090920-1017

If I attempt to rename a method like  getID() to getId() [note the little 'd'], if some affected files are read-only, the refactor will silently fail.  The key here is that the new method name equalsIgnoreCase the old name.

If I attempt to rename the same method to getIdddd(), I will get warnings that some affected files are read-only, and an option to make them writable.

Reproducible: Always

Steps to Reproduce:
Create classes:
     class Foo { 
        public static void getID() {;} 
     }
     class FooUser {  // ensure this file is read-only
        public causeTrouble() {
           Foo.getID();
        }
     }

Refactor Foo, renaming getID to getId (little d).  Even though FooUser is read-only, it'll fail to recognize and will silently fail.  Now rename getID to getIdddddd, and you'll get the warning that FooUser is read-only.
Comment 1 Olivier Thomann CLA 2010-05-12 09:46:10 EDT
Move to JDT/UI
Comment 2 Dani Megert CLA 2010-05-12 10:46:44 EDT
I cannot reproduce this using 3.6 M7 or N20100511-2000.