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 253653 - Moving packages fails with read-only GUI code
Summary: Moving packages fails with read-only GUI code
Status: RESOLVED INCOMPLETE
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.0.2
Hardware: PC Windows 8
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-22 14:27 UTC by Captain_Hillman
Modified: 2015-09-15 14:49 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample project (23.86 KB, application/zip)
2015-09-15 14:48 UTC, Tomas Pavek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Captain_Hillman 2015-07-22 14:27:15 UTC
Product Version = NetBeans IDE 8.0.2 (Build 201411181905)
Operating System = Windows 8 version 6.2 running on amd64
Java; VM; Vendor = 1.8.0_45
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.45-b02
-----------------------------------------------------------------------

In attempting to move packages around, if the package to be moved contains classes that are referenced in read-only blocks of code elsewhere with the project, NetBeans fails to refactor these references; In essence leading one to the situation where you need to manually edit the code in the read-only blocks (but can't because NetBeans is guarding them!).

To reproduce:
Create a simple Swing GUI form containing references to a custom class in another package (perhaps a custom UI component).
Attempt to move the package that contains the referenced class.
Watch in horror as NetBeans fails to update the new package path in the guarded GUI code.
Comment 1 Tomas Pavek 2015-09-15 14:48:42 UTC
Created attachment 156190 [details]
sample project

It is possible there are cases the names of components are not updated in the generated GUI code when a package is renamed. However, in general it works. In the attached project rename 'my.component' package which contains a component used in a GUI form - the reference to the component is correctly updated.
Comment 2 Tomas Pavek 2015-09-15 14:49:36 UTC
That said, we need a specific test case where the package renaming does not update the GUI form.