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 211122 - Inspect & Transform fails to skip occurrences in guarded blocks
Summary: Inspect & Transform fails to skip occurrences in guarded blocks
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-12 22:26 UTC by Jesse Glick
Modified: 2016-07-07 07:17 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 Jesse Glick 2012-04-12 22:26:10 UTC
If you run I&T on a project with a lot of forms using NbBundle.getMessage in form-controlled labels, the Preview dialog will show

1. Calls to getMessage in unguarded code transformed, as expected.

2. Bundle keys from #1 removed, as expected.

3. Calls to gM in guarded code, but checkboxes unselected and marked in red text as errors.

4. Bundle keys from #3 removed, which you would have to manually skip (not generally possible since they may be in the same hunks as #2).

Note that the editor does not lightbulb hints for occurrences inside guarded blocks, so it is just I&T which is missing this check. (HintsInvoker.isInGuarded, I suppose.)
Comment 1 Svata Dedic 2013-09-05 12:54:45 UTC
Please clarify what transformation you refer to. I've tried to run I&T in NB7.4 on some NB forms, but saw nothing as described in this defect. Thanks.
Comment 2 Jesse Glick 2013-09-10 16:10:55 UTC
The hint in apisupport.refactoring (IIRC) to replace NbBundle.getMessage with @Messages.
Comment 3 Martin Balin 2016-07-07 07:17:08 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss