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 206543 - Permit @NbBundle.Messages on fields
Summary: Permit @NbBundle.Messages on fields
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks: 190129
  Show dependency tree
 
Reported: 2011-12-19 15:34 UTC by Jesse Glick
Modified: 2012-01-04 15:43 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Proposed patch (10.44 KB, patch)
2011-12-19 16:18 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2011-12-19 15:34:05 UTC
There is no particular reason to forbid use of @Messages on fields, it was just not initially thought useful. In fact sometimes it is desirable; either code traditionally kept a localized String as a field (better refactored to be inlined of course), or the field initializer is of an anonymous inner class which uses a bundle string in some method.
Comment 1 Jesse Glick 2011-12-19 16:18:39 UTC
Created attachment 114308 [details]
Proposed patch
Comment 2 Jesse Glick 2011-12-19 16:19:01 UTC
Please review.
Comment 3 Jaroslav Tulach 2011-12-20 09:08:14 UTC
Right, I need that for issue 190129 as well.
Comment 4 Jesse Glick 2011-12-20 15:38:57 UTC
Makes sense; see the diff to the existing GroupOptionProcessor.
Comment 5 Jesse Glick 2012-01-03 14:58:30 UTC
core-main #a4ea1f7d8d68
Comment 6 Quality Engineering 2012-01-04 15:43:06 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/a4ea1f7d8d68
User: Jesse Glick <jglick@netbeans.org>
Log: #206543: permit @NbBundle.Messages on fields.