This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 121902 - [Move Inner to Outer] Name of inner class is not updated
Summary: [Move Inner to Outer] Name of inner class is not updated
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-14 12:47 UTC by Jiri Prox
Modified: 2009-11-02 11:04 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2007-11-14 12:47:30 UTC
Product Version: NetBeans IDE 6.0 RC1 (Build 200711140000)
Java: 1.6.0_05-ea; Java HotSpot(TM) Client VM 1.6.0_05-ea-b06
System: Linux version 2.6.5-1.358 running on i386; UTF-8; en_US (nb)

All occurrences of inner class name are not updated when moving inner to outer level and the name of target class is
changed.

Steps to reproduce:
1) have a class:
public class OuterClass {           
    public class InnerClass {
        public void m() {
            InnerClass ic;
        }
    }           
}

2) call Move Inner to Outer Level and in the refactoring dialog change Class Name 

-> 
public class InnerClassRenamed {

    OuterClass outer;

    public InnerClassRenamed(OuterClass outer) {
        super();
        this.outer = outer;
    }

    public void m() {
        InnerClass ic;   // <--- reference to original class name is not updated 
    }
}
Comment 1 Jan Becicka 2007-11-23 10:53:33 UTC
Problem is following.

I do the missing change, but the problem seems to be in fact, that whole tree is later regenerated into new source. 
What is the right sequence? Refactor tree and insert it into new compilation unit or insert tree into compilation unit
and refactor later. BTW it looks like both approaches does not work.
Comment 2 Jan Becicka 2008-11-13 13:34:26 UTC
Will resolve later
Comment 3 Quality Engineering 2009-11-02 11:04:52 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX