@@ -0,0 +1,1123 @@
+package com.opcoach.training.e4.codesamples;%0A%0Aimport javax.inject.Inject;%0Aimport javax.inject.Named;%0A%0Aimport org.eclipse.e4.core.contexts.ContextInjectionFactory;%0Aimport org.eclipse.e4.core.contexts.IEclipseContext;%0Aimport org.eclipse.e4.ui.services.IServiceConstants;%0Aimport org.eclipse.jface.wizard.Wizard;%0Aimport org.eclipse.ui.PlatformUI;%0A%0Apublic class SampleWizardWIthAutoInject extends Wizard%0A%7B%0A%09private SampleWizardPage firstPage = null;%0A%09%09%0A%09private IEclipseContext context;%0A%09%0A%09@Inject @Named(IServiceConstants.ACTIVE_SELECTION) Object selection;%0A%09%0A%09public SampleWizardWIthAutoInject()%0A%09%7B%0A%09%09setWindowTitle(%22New Wizard%22);%0A%09%09context =  PlatformUI.getWorkbench().getService(IEclipseContext.class);%0A%09%09ContextInjectionFactory.inject(this, context);%0A%09%7D%0A%09%0A%09@Override%0A%09public void dispose()%0A%09%7B%0A%09%09ContextInjectionFactory.uninject(this,  context);%0A%09%09super.dispose();%0A%09%7D%0A%0A%09@Override%0A%09public void addPages()%0A%09%7B%0A%09%09firstPage = ContextInjectionFactory.make(SampleWizardPage.class, context);%0A%09%09addPage(firstPage);%0A%09%7D%0A%0A%09@Override%0A%09public boolean performFinish()%0A%09%7B%0A%09%09// Do your stuff here by asking the pages...%0A%09%09return true;%0A%09%7D%0A%0A%7D%0A

Add a sample wizard with an auto injection in samples