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 51855 - Ability to refactor guarded code
Summary: Ability to refactor guarded code
Status: RESOLVED DUPLICATE of bug 44267
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
: 73523 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-25 17:55 UTC by _ gtzabari
Modified: 2007-04-03 18:02 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2004-11-25 17:55:55 UTC
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?
Comment 1 Martin Matula 2004-11-26 20:06:19 UTC
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 ***
Comment 2 Jiri Prox 2006-03-13 10:48:44 UTC
*** Issue 73523 has been marked as a duplicate of this issue. ***