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 73111 - [65cat] Bundle keys are not changed when package are renamed
Summary: [65cat] Bundle keys are not changed when package are renamed
Status: VERIFIED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Properties (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@utilities
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-28 16:39 UTC by Michel Graciano
Modified: 2008-08-15 13:19 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 Michel Graciano 2006-02-28 16:39:43 UTC
Steps in a NetBeans module project:
1 - Create any GUI and use internationalized strings ate any componets;
2 - Rename the GUI class package;
3 - Open the form again and see the invalids bundle keys entries.

Regards.
Comment 1 Jan Becicka 2006-05-05 08:59:43 UTC
It should be handled by properties module, which should implement it's
refactoring plugin.
Comment 2 Marian Petras 2006-05-05 11:53:13 UTC
Accepted.
Comment 3 Tomas Pavek 2008-07-15 10:19:33 UTC
For GUI forms this has been fixed with issue 48288. I've just checked the described test case works in current 6.5 dev 
build.

Implementing this renaming in general for any source code accessing a properties bundle via class name in a String 
would be quite tricky and unreliable. In this case it would be better to try to avoid the package name in String and 
derive it e.g. from the class, or use different resources system - e.g. Swing Application Framework. Such a code is 
handled by standard java refactoring automatically.

*** This issue has been marked as a duplicate of 48288 ***
Comment 4 Michel Graciano 2008-07-15 18:49:59 UTC
I am using the M1 and can see the problem yet.

1. Create the Anagram project example
2. Select form for automatically internationalize the strings
3. Rename the form package from com.toy.anagrams.ui to com.toy.anagrams.ui2 and the
'ResourceBundle.getBundle("com/toy/anagrams/ui/Bundle")' code are not updated on guarded block

Regards
Comment 5 Tomas Pavek 2008-07-16 18:33:49 UTC
You are right with the Anagram example. There was a bug in handling the package name. I tried with short (one-part) 
package name which worked fine, but longer name (with .) was a problem. I've fixed it.

http://hg.netbeans.org/main/rev/2d8a894cf685
Comment 6 Quality Engineering 2008-07-17 04:48:27 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #324 build
Changeset: http://hg.netbeans.org/main/rev/2d8a894cf685
User: Tomas Pavek <tpavek@netbeans.org>
Log: #73111: full package name must be obtained as the old name
Comment 7 Michel Graciano 2008-08-15 13:19:24 UTC
v. 200808141419