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 105751 - REF: Custom code in guarded blocks not refactored
Summary: REF: Custom code in guarded blocks not refactored
Status: VERIFIED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All Linux
: P2 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
: 105820 108248 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-05 15:41 UTC by Jiri Vagner
Modified: 2007-07-20 12:40 UTC (History)
1 user (show)

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 Jiri Vagner 2007-06-05 15:41:06 UTC
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
Comment 1 Jiri Vagner 2007-06-05 15:43:26 UTC
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
Comment 2 Tomas Pavek 2007-06-05 17:01:22 UTC
The custom user code entered into the form is not refactored, this case is not 
supported at the moment.
Comment 3 Tomas Pavek 2007-06-06 13:10:15 UTC
*** Issue 105820 has been marked as a duplicate of this issue. ***
Comment 4 Jiri Vagner 2007-06-07 13:40:58 UTC
In my opinion this issue is more important than the other P3 issues. I'm
increasing issue priority to P2.
Comment 5 Tomas Pavek 2007-06-27 09:51:18 UTC
*** Issue 108248 has been marked as a duplicate of this issue. ***
Comment 6 Tomas Pavek 2007-07-18 16:33:29 UTC
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
Comment 7 Jiri Vagner 2007-07-20 12:40:02 UTC
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)