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.
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.
Confirmed, accepted.
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.
I confirm it is in the dev. build of NB 6.0 (custom build from 26 June 2006).
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
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.