Eclipse RCP Inject into instance of IWizard
<p>I am trying to inject some of my Wizard's fields.</p>

<p>I can successfully inject my own OSGi DS using the following helper class:</p>

<pre class="lang-java prettyprint-override"><code>public class UtilRCP {

public static void inject(Plugin plugin, Object object) {

IEclipseContext serviceContext = EclipseContextFactory.getServiceContext(plugin.getBundle().getBundleContext());
ContextInjectionFactory.inject(object, serviceContext);
    }
}
</code></pre>

<p>Other Services from the RCP ecosystem such as PartService or MApplication fail to be injected (null / no actual value was found for the argument "MApplication").</p>

<p>Here is the code</p>

<pre class="lang-java prettyprint-override"><code>public class MyWizard extends MyAbstractWizard implements IImportWizard {

    private MyWizardPage page;
    @Inject
    private EPartService partService;
    @Inject
    private DatabaseProvider databaseProvider;
    @Inject
    private MApplication application;

    public MyWizard() {
        System.err.println("Create");
        System.err.println(databaseProvider);
        System.err.println(partService);
        System.err.println(application);
    }

    @Override
    public void init(IWorkbench workbench, IStructuredSelection selection) {

        UtilRCP.inject(Activator.getDefault(), this);
        System.err.println("Init");
        System.err.println(databaseProvider);
        System.err.println(partService);
        System.err.println(application);
    }

    @Override
    public void addPages() {

        super.addPages();
        page = new MyWizardPage();
        addPage(page);
    }

    @Override
    public boolean performFinish() {

        return true;
    }
}
</code></pre>