Configure IDEA to treat an annotation as an injector

Hi,

Is there a way, other than writing a plugin, to configure IDEA to treat a field annotation (e.g. `org.apache.felix.scr.annotations.Reference`) as an injector so that IDEA does not mark the field as "never assigned", which in turn makes it rendered in gray?

For example:

import org.apache.felix.scr.annotations.Reference;


public class Foo {


    @Reference
    private Foo foo;
}

2 comments
Comment actions Permalink

Well, I can't believe that IDEA is actually supporting this! B-)

I found the solution here: http://stackoverflow.com/a/6762287/309683

unused-declaration.png

However it doesn't seem to have any effect on the project :(

0
Comment actions Permalink

Fixed. It was an option in the inspection popup.

0

Please sign in to leave a comment.