Bug 130111

Summary: [rename] Rename texual references also for member types
Product: [Eclipse Project] JDT Reporter: Christoph Knabe <knabe>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
URL: http://www.tfh-berlin.de/~knabe/
Whiteboard:

Description Christoph Knabe CLA 2006-03-02 08:12:41 EST
1. Code:

package a.b;

public class MyClass {

    public static class MyExc extends Exception {}
    
}


2. Request:

When selecting MyExc for  Refactor > Rename ...
(I think alike Move..., Move Member Type to New File) 
the upcoming dialog "Rename Type" should have the possibility to check
"Update canonical name in non-Java files",
and to give "File name patterns", similarly as we can do with the fully qualified name when renaming the top level class MyClass.


3. Motivation:

We use an exception's canonical name as key to a .properties file containing the appropriate message texts for each exception.

Actually, we use the class name as provided by java.lang.Class.getName(), that is here 
"a.b.MyClass$MyExc",
but for us the canonical name "a.b.MyClass.MyExc" would be acceptable, too.
Unfortunately, there is no exact naming of the format, which returns Class.getName().
Comment 1 Martin Aeschlimann CLA 2006-03-03 07:08:52 EST
We have this feature, but only for top-level types and fields.

Makes sense to update it for inner member types.