Bug 130111 - [rename] Rename texual references also for member types
Summary: [rename] Rename texual references also for member types
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Markus Keller CLA
QA Contact:
URL: http://www.tfh-berlin.de/~knabe/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-02 08:12 EST by Christoph Knabe CLA
Modified: 2006-08-03 12:30 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 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.