Why do we pass Container to MainPluginApiProvider?

@yevhen @florentbenoit I’m refactoring HostedPluginSupport in the frontend to support proper plugins unloading and reloading. And notice that we pass Container to MainPluginApiProvider as an arg. I don’t think it is necessary MainPluginApiProvider are provided by DI so their implementation already can inject whatever is required.

[original thread by Anton Kosyakov]


Yes, you are right, we do not need Container as parameter

actually, @tsmaeder showed yesterday how it is used on another side to set up new proxies on RCP and it is kind of make sense, i will leave it as is in order to avoid breaking

When did I get to be an expert? :wink:

Honestly, i will prefer DI for everything and not use new operator at all. So If I would do it again, i will create a child container for each RPC and bind services into it instead of passing container around. In this way extenders can rebind child container in order to work around bugs, customize or add more services. I won’t change it now though.