Achal1607 commented on code in PR #7548:
URL: https://github.com/apache/netbeans/pull/7548#discussion_r1687403920


##########
java/java.hints/src/org/netbeans/modules/java/hints/bugs/Unused.java:
##########
@@ -52,7 +52,12 @@ public class Unused {
     @BooleanOption(displayName="#LBL_UnusedPackagePrivate", 
tooltip="#TP_UnusedPackagePrivate", 
defaultValue=DETECT_UNUSED_PACKAGE_PRIVATE_DEFAULT)
     public static final String DETECT_UNUSED_PACKAGE_PRIVATE = 
"detect.unused.package.private";
 
-    @TriggerTreeKind(Kind.COMPILATION_UNIT)
+    @TriggerTreeKind({
+        //class-like kinds:
+        Kind.ANNOTATION_TYPE, Kind.CLASS, Kind.ENUM, Kind.INTERFACE, 
Kind.RECORD,
+        Kind.VARIABLE,
+        Kind.METHOD
+    })
     public static List<ErrorDescription> unused(HintContext ctx) {

Review Comment:
   This change is made so that it can honour `@SuppressWarnings("unused")` 
otherwise currently suppress warning annotation for unused variables is not 
working. For more info please refer to 
https://github.com/oracle/javavscode/issues/96



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to