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)
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)
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?
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".
I have stripped out all other usages for simplicity.
Created attachment 53608 [details]
Sample code to reproduce the refactor / rename problem.
The attached zip file is encrypted. So, I cannot verify that, but I believe that the line
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 ***