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 122873

Summary: Refactor / Rename not completing in some cases
Product: guibuilder Reporter: tantle <tantle>
Component: CodeAssignee: issues@guibuilder <issues>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: issues
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Attachments: Sample code to reproduce the refactor / rename problem.

Description tantle 2007-11-27 16:29:08 UTC
Refactor / Rename has been working great but I found one exception where I can't get it to work.  I have a method named 
getControls that I was just trying to rename it with a capital "G".  The method declaration gets renamed but the line 
below does not which causes a compilation error when not finding the "G" version referenced by the "g" version.

    getContentPane().add(textPanel.getControls(), "Last");   (this one does not get renamed)

    public JPanel getControls() ...   (this one gets renamed to GetControls)
Comment 1 tantle 2007-11-27 16:30:59 UTC
Product Version: NetBeans IDE 6.0 RC2 (Build 200711201000)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Comment 2 Jiri Prox 2007-11-28 09:00:49 UTC
Are you refactoring plain java file or some type of GUI form?
If the latter is the occurrence which does not change in guarded block?
Comment 3 tantle 2007-11-28 15:21:48 UTC
I am refactoring a plain java file.  Attached is a sample project.  The password for the zip file is "refactor".
To reproduce the problem, right-click on either the "getControls" declaration in CurvingText.java or the usage in 
CurvingTextFrame.java.  Select refactor / rename and change the "g" to a "G", for example.  The declaration will change 
but not the usage in the guarded block as shown inside "initComponents".

getContentPane().add(curvingTextPanel.getControls(), "Last");

I have stripped out all other usages for simplicity.  
Comment 4 tantle 2007-11-28 15:23:43 UTC
Created attachment 53608 [details]
Sample code to reproduce the refactor / rename problem.
Comment 5 Jan Stola 2007-11-29 10:40:45 UTC
The attached zip file is encrypted. So, I cannot verify that, but I believe that the line
getContentPane().add(textPanel.getControls(), "Last");
was entered as user custom code.

Hence, this issue is a duplicate of issue 106831 e.g. this use case is one of unsupported refactoring scenarios 
(updating embedded custom code) in the current GUI builder.

*** This issue has been marked as a duplicate of 106831 ***