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 204912 - Problems with NbBundle hint
Summary: Problems with NbBundle hint
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.1
Hardware: All All
: P4 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-10 07:26 UTC by Jan Stola
Modified: 2016-07-07 07:16 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 Jan Stola 2011-11-10 07:26:49 UTC
When I have the following code in some class in NetBeans module

  NbBundle.getBundle(SomeClass.class).getString(someKey);

I can see a hint offering me to replace this code by 

  NbBundle.getMessage(SomeClass.class, someKey)

First of all, I don't see the reason for such change. The only thing that getMessage() method does is call getBundle().getString() and I doubt that this is going to change in future. Therefore, I don't see any benefit of the replacement.

Even if you decide to keep this (imho unhelpful) hint. Please, allow to disable it. It is not possible to disable the hint in Tools > Options because the hint is not present in Editor > Hints section. It is also not possible to disable it by clicking on the icon in editor's gutter and invoking Disable "NbBundle" Hint. The menu item is there but doesn't seem to do anything.
Comment 1 Quality Engineering 2011-11-13 16:26:20 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/a6fd466af95a
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #204912: even ClassPath based hints should check isEnabled, also fixes possibility of duplicated CP-based hints (once through hints task and once through suggestions task).
Comment 2 Jan Lahoda 2013-07-09 14:56:09 UTC
Two distinct problems:
-the hint is not shown in Tools/Options etc. (partially relieved by the above commit which allows the hint to be disabled from the editor).
-the hint itself, which is matter of the creators of the hint, i.e. openide.util.
Comment 3 Martin Balin 2016-07-07 07:16:24 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