Tracking unused methods with CDI Events EE6 (RESOLVED)

Hello folks!

I've been developing with IDEA for 3 months and I can say that it's the best IDE for Java developing thet I've ever met.
One of the features that is very useful for everyone who works with EE 6, CDI and JSF is the tracking for unused methods refered by EL expressions, it works very well, but java EE6 has now the JSR299, which brought a old seam feature, @Observers (called events).
When I put the qualifiers and the Observer annotations in a method IDEA thinks it's unused, because it can't track by this way (I think).. is there a plugin or something to solve that problem?

Thanks for everything!

3 comments
Comment actions Permalink

You can go to Settings | Inspections | Declaration redundancy | Unused declaration, press the "Configure annotations..." button and add the @Observer annotation to the list.

0
Comment actions Permalink

Very nice thanks!

IDEA now ignores the methods with @Observers annotation for unused validations, but it still can't resolve the qualifiers combination for listeners methods, can it? It'll be very nice if it can find the methods declared with that qualifiers combinations and search in the project if there is a Event which fires anything declared with the matching combation of qualifiers, I don't now if it is possible, I'm just thinking about it.

0
Comment actions Permalink

Just completing, I don't think that's a good idea ignore the @Observers methods, if it can look for "Qualifiers + Event" matching declarations will solve that question, instead of verify if this combination is used indeed (which I think that's more difficult).

=]

0

Please sign in to leave a comment.