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.
Steps to reproduce: - Create jframe NewJFrame.java - Add JButton - Invoke Properties dialog for button - Select "Code" tab - Add code "Class cl1 = NewJFrame.class;" into Pre-Creation code property - Add code "Class cl2 = NewJFrame.class;" into Pre-Init code property - Add code "Class cl3 = NewJFrame.class;" into Pre-Declaration code property - Rename class name to "MyNewJFrame" using refactoring - Check the code in guarded blocks
NetBeans IDE Dev (Build 200706050535) Linux version 2.6.17-10-386 running on i386 1.6.0_02-ea; Java HotSpot(TM) Client VM 1.6.0_02-ea-b02
The custom user code entered into the form is not refactored, this case is not supported at the moment.
*** Issue 105820 has been marked as a duplicate of this issue. ***
In my opinion this issue is more important than the other P3 issues. I'm increasing issue priority to P2.
*** Issue 108248 has been marked as a duplicate of this issue. ***
I've implemented a provisional "refactoring" of the custom code blocks which should cover the cases mentioned here. I.e. it should be able to rename the component variable in custom code when the component is renamed, and also rename classes (external classes or the form class itself). A general refactoring of custom code blocks is out of scope for now. /cvs/form/src/org/netbeans/modules/form/FormRefactoringUpdate.java new revision: 1.5; previous revision: 1.4
Verified Product Version: NetBeans IDE Dev (Build 200707190325) Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b05 System: Linux version 2.6.20-16-generic running on i386; UTF-8; en_US (nb)