Dependency injection in IDEA plugins

Answered

Is there a way to use a full set of PicoContainer features out-of-the-box ("component-service model") ? i.e. custom contexts with manually defined parent-child hierarchy, injection via Provider classes and so on.

0
3 comments

No. Consider to use IJ Platform Services and Extensions.

1

Okay, got it. Btw, can you clarify another thing too? Can I have multiple implementations of some service's interface and decide what implementation to inject in the point of injection? Something like a @Qualifier annotation in Spring. 

0

What is the use case for having multiple implementations? You can distinguish between production (serviceImplementation), headless (headlessImplementation) and test (testServiceImplementation) by specifying according implementation in plugin.xml.

0

Please sign in to leave a comment.