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 193276

Summary: Please, add "suppress warning" option for all hints, where it would be possible.
Product: editor Reporter: converginglight
Component: Hints & AnnotationsAssignee: Milutin Kristofic <mkristofic>
Status: NEW ---    
Severity: normal CC: dtrebbien, mprentice
Priority: P3    
Version: 7.0   
Hardware: All   
OS: All   
See Also: http://netbeans.org/bugzilla/show_bug.cgi?id=159645
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Screenshot of "Suppress Warning" option

Description converginglight 2010-12-11 22:46:13 UTC
Currently, the "suppress warning" option is only there for javac-standard warnings.

The hint "suspicious method call" can be disabled using

    @SuppressWarnings("element-type-mismatch")

...well, how would one know that?
I couldn't find a complete list of all NB-related hints/warnings-overrides (which is sad. Well, at least there is no list, where "element-type-mismatch" would be mentioned).

So, my kindly request is: please add the "suppress warning" option for all those hints/warnings, where it would be possible.
Comment 1 dtrebbien 2016-03-31 14:32:03 UTC
Created attachment 159076 [details]
Screenshot of "Suppress Warning" option

I think that this can be closed as RESOLVED.  In NetBeans 8.1, when you press Alt+Enter, you should see a "Configure '...' Hint" entry.  Press the up/down arrow keys until the entry is highlighted, if necessary.  Then press the right arrow key.  You should see a submenu where one of the options is "Suppress Warning - ...".  If you click that, then a @SuppressWarnings annotation will be automatically added.

Here is a screenshot.

This is all handled automatically by org.netbeans.spi.java.hints.ErrorDescriptionFactory if the hint configures suppressWarnings key(s).