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 238094 - The gui editor can't find a resource bundle generated via the @Messages annotation
Summary: The gui editor can't find a resource bundle generated via the @Messages annot...
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-07 13:36 UTC by aldobrucale
Modified: 2014-01-16 02:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 205105


Attachments
stacktrace (3.25 KB, text/plain)
2013-11-07 13:36 UTC, aldobrucale
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aldobrucale 2013-11-07 13:36:10 UTC
Build: NetBeans IDE 7.4 (Build 201310111528)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.45-b08, Java(TM) SE Runtime Environment, 1.7.0_45-b18
OS: Linux

User Comments:
aldobrucale: A problem in the edited code prevented the gui editor to show up




Stacktrace: 
java.util.MissingResourceException: Can't find resource for bundle org.openide.util.NbBundle$PBundle, key CommercialInfoDisplayer.NO_DEVICE_SELECTED
   at java.util.ResourceBundle.getObject(ResourceBundle.java:395)
   at java.util.ResourceBundle.getString(ResourceBundle.java:355)
   at org.openide.util.NbBundle.getMessage(NbBundle.java:642)
   at com.imavis.omc.deviceui.view.Bundle.CommercialInfoDisplayer_NO_DEVICE_SELECTED(Bundle.java:17)
   at com.imavis.omc.deviceui.view.CommercialInfoDisplayer.setDevice(CommercialInfoDisplayer.java:55)
   at com.imavis.omc.deviceui.view.CommercialInfoDisplayer.updateNode(CommercialInfoDisplayer.java:71)
Comment 1 aldobrucale 2013-11-07 13:36:11 UTC
Created attachment 141939 [details]
stacktrace
Comment 2 aldobrucale 2013-11-07 13:41:28 UTC
The resource mentioned in the stack trace should have been generated during the compilation using the @NbBundle.Messages annotation
Comment 3 Tomas Pavek 2014-01-14 10:42:16 UTC
This seems to happen due to optimization created for bug 69377 which prefers to find resources for custom components in sources where they are always up-to-date (won't get to execution classpath until the user rebuilds the whole project). For resources created/modified by the user directly this is fine, however for @NbBundle.Messages annotation this is a problem since the properties are only generated to the file in built results. If the Bundle.properties file is also available in sources (for other properties) then it is found, but doesn't contain the properties from the annotations.

Attempt to find some balance between the two conflicting requirements:
http://hg.netbeans.org/jet-main/rev/cbe4fbb16440
Comment 4 Quality Engineering 2014-01-16 02:43:41 UTC
Integrated into 'main-silver', will be available in build *201401160001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/cbe4fbb16440
User: Tomas Pavek <tpavek@netbeans.org>
Log: #238094: content generated from @NbBundle.Messages annotation is only available on execution classpath