Community
Participate
Working Groups
Build Identifier: 20110916-0149 I use methods annotated with @Subscribe and and method parameters annotated with @Observes for event management with Guava's EventBus and RoboGuice's EventManager respectively. I don't want those parameters reported as unused, so I've disabled unused parameter warnings. What I'd like is the ability to only enable unused parameter warnings for constructors. Better yet, if you could add an ignore list for unused parameters/methods that are annotated with a list of provided annotations. That way you could please people like this guy: https://bugs.eclipse.org/bugs/show_bug.cgi?id=376590 So you'd have a list of parameter annotations (like @Observes) that would tell Eclipse to ignore if unused, and an independent set of method annotations (such as @Subscribe, @Inject for constructors, etc.) that would cause Eclipse to ignore all of the fields in the annotated method. Reproducible: Always
I recently discovered UCDetector (unused code detector) for Eclipse. It offers powerful ignore options including a list of annotations to ignore as I requested. If you'd like to mine it for ideas: http://www.ucdetector.org/preferences.html It doesn't check private methods, so it's not a full replacement for Eclipse's unused code warnings.
Also, IntelliJ IDEA has recently implemented warning suppression by configurable annotations to support Guava's EventBus scenario: http://youtrack.jetbrains.com/issue/IDEA-75640
This also applies to JavaFX @FXML annotations. It would be nice to have errors/warnings only about the constructor. Or the suggested annotation list.
We will take this up early 4.6.
No progress yet and unlikely to get time during 4.6. Moving out.
Bulk move out of 4.8