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 - Cannot rename member used in guarded blocks of forms
Summary: Cannot rename member used in guarded blocks of forms
Status: VERIFIED DUPLICATE of bug 48288
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-29 22:44 UTC by Jesse Glick
Modified: 2007-04-03 18:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

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