Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 122873 - Refactor / Rename not completing in some cases
Refactor / Rename not completing in some cases
Status: RESOLVED DUPLICATE of bug 106831
Product: guibuilder
Classification: Unclassified
Component: Code
6.x
PC Windows XP
: P3 (vote)
: TBD
Assigned To: issues@guibuilder
issues@guibuilder
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-27 16:29 UTC by tantle
Modified: 2007-11-29 10:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
Sample code to reproduce the refactor / rename problem. (571.25 KB, application/x-compressed)
2007-11-28 15:23 UTC, tantle
Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo