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 67777

Summary: Cannot rename member used in guarded blocks of forms
Product: editor Reporter: Jesse Glick <jglick>
Component: RefactoringAssignee: issues@java <issues>
Status: VERIFIED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Jesse Glick 2005-10-29 22:44:37 UTC
If you have a class or method used in custom initialization code in a form, and
you try to rename it, you will get an error in the Refactoring window saying
that the occurrence in the guarded block cannot be renamed.

Clearly this check was put in intentionally, and it is certainly better than
trying to change the reference and then failing with an exception. But as a user
I expect the IDE to just rename the usage (in the .form file and in the .java
file together). If I cannot use refactoring functionality then what is the point
of using custom code in the form editor at all? I might as well just move the
code out of initComponents() (which is a workaround).

The I18N module has a special bridge that lets it work properly with the form
editor. The refactoring module should do the same.
Comment 1 Jan Becicka 2005-10-31 07:20:48 UTC

*** This issue has been marked as a duplicate of 48288 ***
Comment 2 Jesse Glick 2005-10-31 19:26:42 UTC
Yes, same.