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.
It should be possible to refactor classes that are referenced by "guarded code" and have that guarded code get modified as well. Right now you are practically asking people to shut down Netbeans, open up a crude text editor to rename the references and restart. Netbeans can and should handle it itself and my guess is doing so is extremely easy (just ignore the fact that the block is guarded). I assume you guys had some sort of reason for not doing this. Was it a lack of time? Or some other safety issue I am not familiar with?
The problem is that the code in guarded blocks is generated by other modules (e.g. form editor). These modules use other files to generate the guarded blocks from (e.g. the *.form files used by form editor). So, even if the refactoring would change the code, as soon as you would open it in the form editor, it would be re-generated back to the uncompilable one. We will address this in promoE. FYI: At the beginning the refactoring module did change the code in guarded blocks. We had to spend several hours of work to add the guarded blocks checking to disallow that. *** This issue has been marked as a duplicate of 44267 ***
*** Issue 73523 has been marked as a duplicate of this issue. ***