Revision 5a1b054d
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/e4/AbstractImportWizardE4.java | ||
---|---|---|
10 | 10 |
package eu.etaxonomy.taxeditor.io.e4; |
11 | 11 |
|
12 | 12 |
import javax.inject.Inject; |
13 |
import javax.inject.Named; |
|
13 | 14 |
|
14 | 15 |
import org.eclipse.e4.core.contexts.ContextInjectionFactory; |
15 | 16 |
import org.eclipse.e4.core.contexts.IEclipseContext; |
17 |
import org.eclipse.e4.core.di.annotations.Optional; |
|
18 |
import org.eclipse.e4.ui.services.IServiceConstants; |
|
16 | 19 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
17 | 20 |
import org.eclipse.jface.dialogs.MessageDialog; |
18 | 21 |
import org.eclipse.jface.viewers.IStructuredSelection; |
19 | 22 |
import org.eclipse.jface.wizard.IWizardContainer; |
20 | 23 |
import org.eclipse.jface.wizard.Wizard; |
21 | 24 |
import org.eclipse.swt.SWT; |
22 |
import org.eclipse.ui.IWorkbench; |
|
23 | 25 |
|
24 | 26 |
import eu.etaxonomy.cdm.io.common.IImportConfigurator; |
25 | 27 |
import eu.etaxonomy.cdm.io.common.IIoConfigurator; |
... | ... | |
37 | 39 |
protected GenericConfiguratorWizardPageE4 pageConfiguration; |
38 | 40 |
private NomenclaturalCodeWizardPageE4 pageNomenclaturalCode; |
39 | 41 |
|
40 |
private IWorkbench workbench; |
|
41 |
|
|
42 |
private IStructuredSelection selection; |
|
42 |
protected IStructuredSelection selection; |
|
43 | 43 |
|
44 | 44 |
protected IEclipseContext context; |
45 | 45 |
|
46 | 46 |
private EPartService partService; |
47 | 47 |
|
48 | 48 |
@Inject |
49 |
public AbstractImportWizardE4(IEclipseContext context, EPartService partService) { |
|
49 |
public AbstractImportWizardE4(IEclipseContext context, EPartService partService, |
|
50 |
@Optional@Named(IServiceConstants.ACTIVE_SELECTION)IStructuredSelection selection) { |
|
50 | 51 |
this.context = context; |
51 | 52 |
this.partService = partService; |
53 |
this.selection = selection; |
|
52 | 54 |
} |
53 | 55 |
|
54 | 56 |
/** {@inheritDoc} */ |
... | ... | |
101 | 103 |
return selection; |
102 | 104 |
} |
103 | 105 |
|
104 |
public void setWorkbench(IWorkbench workbench) { |
|
105 |
this.workbench = workbench; |
|
106 |
} |
|
107 |
|
|
108 |
public IWorkbench getWorkbench() { |
|
109 |
return workbench; |
|
110 |
} |
|
111 | 106 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/e4/abcd/AbcdImportWizardE4.java | ||
---|---|---|
17 | 17 |
import org.eclipse.e4.core.contexts.ContextInjectionFactory; |
18 | 18 |
import org.eclipse.e4.core.contexts.IEclipseContext; |
19 | 19 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
20 |
import org.eclipse.jface.viewers.IStructuredSelection; |
|
20 | 21 |
|
21 | 22 |
import eu.etaxonomy.cdm.database.DbSchemaValidation; |
22 | 23 |
import eu.etaxonomy.cdm.io.common.IImportConfigurator.SOURCE_TYPE; |
... | ... | |
39 | 40 |
private ClassificationChooserWizardPageE4 classificationChooserWizardPage; |
40 | 41 |
|
41 | 42 |
@Inject |
42 |
public AbcdImportWizardE4(IEclipseContext context, EPartService partService) { |
|
43 |
super(context, partService); |
|
43 |
public AbcdImportWizardE4(IEclipseContext context, EPartService partService, IStructuredSelection selection) {
|
|
44 |
super(context, partService, selection);
|
|
44 | 45 |
} |
45 | 46 |
|
46 | 47 |
/** {@inheritDoc} */ |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/e4/excel/distribution/ExcelDistributionUpdateWizardE4.java | ||
---|---|---|
25 | 25 |
import org.eclipse.e4.core.contexts.ContextInjectionFactory; |
26 | 26 |
import org.eclipse.e4.core.contexts.IEclipseContext; |
27 | 27 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
28 |
import org.eclipse.jface.viewers.IStructuredSelection; |
|
28 | 29 |
|
29 | 30 |
import eu.etaxonomy.cdm.database.DbSchemaValidation; |
30 | 31 |
import eu.etaxonomy.cdm.io.distribution.excelupdate.ExcelDistributionUpdateConfigurator; |
... | ... | |
49 | 50 |
private static final Logger logger = Logger.getLogger(ExcelDistributionUpdateWizardE4.class); |
50 | 51 |
|
51 | 52 |
@Inject |
52 |
public ExcelDistributionUpdateWizardE4(IEclipseContext context, EPartService partService) { |
|
53 |
super(context, partService); |
|
53 |
public ExcelDistributionUpdateWizardE4(IEclipseContext context, EPartService partService, IStructuredSelection selection) {
|
|
54 |
super(context, partService, selection);
|
|
54 | 55 |
} |
55 | 56 |
|
56 | 57 |
/** {@inheritDoc} */ |
Also available in: Unified diff
ref #7005 Add selection to constructor