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 70168 - I18N string editor remembers bundle-name-slashes from previous project
Summary: I18N string editor remembers bundle-name-slashes from previous project
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: I18N (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Marian Petras
URL:
Keywords: I18N
Depends on:
Blocks: 73913
  Show dependency tree
 
Reported: 2005-12-09 18:19 UTC by _ tboudreau
Modified: 2008-03-25 19:14 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 _ tboudreau 2005-12-09 18:19:34 UTC
I created a module that used Matisse, and localized some strings in it with 
the i18n string property editor (using the format NbBundle..."{bundle-name-
slashes}")).

Now I create a new J2SE project.  I also use the string property editor there.

However, somehow the I18N module is remembering the bundle name from the 
module project I worked on in a previous run of NetBeans, and uses that to 
substitute for bundle-name-slashes.  So all of the generated code is trying to 
look up "org/netbeans/modules/project/portfolios/Bundle", which of course 
doesn't exist in my J2SE project.  The text in the property editor in the 
property sheet says:

KEY ADDR_ZIP : RB org/netbeans/modules/project/portfolios/Bundle

So, somehow it needs to forget the bundle file from the earlier project - the 
code it's generating can't run.
Comment 1 Marian Petras 2005-12-12 11:54:26 UTC
Confirmed, accepted.
Comment 2 Marian Petras 2005-12-12 15:42:57 UTC
It looks like a duplicate of bug #48538 ("NPE when doing I18N") which I fixed
almost 3 months ago. How old build do you use? Are you able to reproduce it with
a recent build? If so, please specify the build number, JDK and platform. Thanks.
Comment 3 Marian Petras 2006-06-27 07:40:08 UTC
I confirm it is in the dev. build of NB 6.0 (custom build from 26 June 2006).
Comment 4 Marian Petras 2006-06-29 16:10:33 UTC
I have partially fixed this bug - the information about the last used resource
bundle is used only if the resource bundle exists in the current project. This
prevents the painful symptom of this bug, generated code which cannot run.

I will fix this issue later such that information about last used resource file
is stored per-project. But this would require more changes so I deferred this
complex fix until I fix more serious bugs.

Modified file:
i18n/form/src/org/netbeans/modules/i18n/form/FormI18nStringEditor.java   (1.12)

Diff:
http://i18n.netbeans.org/source/browse/i18n/form/src/org/netbeans/modules/i18n/form/FormI18nStringEditor.java?r1=1.11&r2=1.12&diff_format=u
Comment 5 Tomas Pavek 2008-03-25 19:14:32 UTC
I think this should have been marked as fixed. Storing "last resource" per project looks like an additional RFE - not
sure if it is good anyway - perhaps it should be rather per package... With regard to form, the auto i18n makes all this
unnecessary.