1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.taxeditor.io.e4.out;
|
11
|
|
12
|
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
|
13
|
import org.eclipse.e4.core.contexts.IEclipseContext;
|
14
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
15
|
import org.eclipse.jface.wizard.Wizard;
|
16
|
|
17
|
import eu.etaxonomy.cdm.io.common.IIoConfigurator;
|
18
|
import eu.etaxonomy.taxeditor.io.e4.in.GenericConfiguratorWizardPageE4;
|
19
|
|
20
|
/**
|
21
|
*
|
22
|
* @author pplitzner
|
23
|
* @since Oct 6, 2017
|
24
|
*
|
25
|
* @param <CONFIG>
|
26
|
*/
|
27
|
public abstract class AbstractExportWizardE4<CONFIG extends IIoConfigurator> extends Wizard {
|
28
|
|
29
|
protected final String CONFIGURATION_PAGE = "CONFIGURATION_PAGE";
|
30
|
|
31
|
private GenericConfiguratorWizardPageE4 pageConfiguration;
|
32
|
|
33
|
protected IStructuredSelection selection;
|
34
|
|
35
|
private IEclipseContext context;
|
36
|
|
37
|
public AbstractExportWizardE4(IEclipseContext context) {
|
38
|
this(context, null);
|
39
|
}
|
40
|
|
41
|
public AbstractExportWizardE4(IEclipseContext context, IStructuredSelection selection) {
|
42
|
this.context = context;
|
43
|
this.selection = selection;
|
44
|
}
|
45
|
|
46
|
/** {@inheritDoc} */
|
47
|
@Override
|
48
|
public void addPages() {
|
49
|
super.addPages();
|
50
|
|
51
|
pageConfiguration = ContextInjectionFactory.make(GenericConfiguratorWizardPageE4.class, context);
|
52
|
pageConfiguration.initExport(getConfigurator(), null);
|
53
|
this.addPage(pageConfiguration);
|
54
|
}
|
55
|
|
56
|
public abstract void init();
|
57
|
|
58
|
public abstract CONFIG getConfigurator();
|
59
|
}
|