5 comments
Comment actions Permalink

(I can inject dependencies to Components but not to AnAction)


0
Comment actions Permalink

Dependency injection is unfortunately not supported for AnAction instances. You need to use getComponent() or getService() to get your dependencies.

0
Comment actions Permalink

thanks, but which object has those methods? AnAction doesn't have them and I can't find them


0
Comment actions Permalink

see com.intellij.openapi.components.ServiceManager and Module/Project/Application to obtain Component from corresponding scope

0

Please sign in to leave a comment.