I’m not going to go into the merits of DI, at least not in this post but what I wanted to say was that I now started to use it for building the plugin. To get the extension points, witch is configured as class names, to get injected I had to create delegating wrappers that simply forwards all method calls to a instance it fetches from the guice injector. It would be nice to be able to get around this but right now I don’t see how.
It add a bit of complexity but in the end it makes everything so much simpler so I believe it will be worth it. I don’t know how to handle the different component levels in idea, Application, Project, Module. I’m hoping I can solve it with scopes in guice but else I will just have to use separate injectors for each level.
0 Responses to “Guice for Dependency Injection”