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 58423 - refactoring does not handle i18n statements
Summary: refactoring does not handle i18n statements
Status: RESOLVED WORKSFORME
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2005-04-28 22:48 UTC by vm47644
Modified: 2007-04-03 18:02 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 vm47644 2005-04-28 22:48:47 UTC
if a class name is changed, the NbBundle.getMessage lines are not updated.

Class MyClass {
 public MyClass() {
   NbBundle.getMessage(MyClass.class, "MY_MSG") ;
 }
}

if name changes to MyNewClass, we have:

Class MyNewClass {
 public MyNewClass() {
   NbBundle.getMessage(MyClass.class, "MY_MSG") ;
 }
}

This is even more problematic if you change packages. Not only does the class
attrib in the NbBundle.getMessage not change, but the packages Bundle is not
updated or the user informed that keys may be missing.
Comment 1 Tomas Hurka 2005-04-29 09:44:16 UTC
I am sorry, but this works for me. You need to provide more detailed steps how to reproduce it. 
Comment 2 Jan Becicka 2005-04-29 10:00:23 UTC
Tomasi, I understand it. But this is rather enhancement, than defect. We don't
perform refactoring in Bundle.properties files.
If you move class to different package, than NbBundle.getMessage(MyClass.class,
"MY_MSG") fail, because Bundle.properties file in the new package does not
contain key from original package.
Comment 3 Martin Matula 2005-04-29 10:55:48 UTC
Seems that user is not talking about bundle keys, but rather the class name in
ClassExpression that is part of the NbBundle.getMessage() statement. Changing
back to defect.
Comment 4 Jan Becicka 2005-08-08 12:43:56 UTC
ClassExpression is changed in NB 4.2.