Revision 40e3002f
Added by Katja Luther over 7 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ExcelNormalExplicitTaxaImportWizard.java | ||
---|---|---|
15 | 15 |
|
16 | 16 |
import org.eclipse.core.runtime.jobs.Job; |
17 | 17 |
import org.eclipse.jface.viewers.IStructuredSelection; |
18 |
import org.eclipse.jface.viewers.TreeSelection; |
|
18 | 19 |
import org.eclipse.ui.IWorkbench; |
19 | 20 |
|
20 | 21 |
import eu.etaxonomy.cdm.database.DbSchemaValidation; |
21 | 22 |
import eu.etaxonomy.cdm.io.common.IImportConfigurator.SOURCE_TYPE; |
22 | 23 |
import eu.etaxonomy.cdm.io.excel.taxa.NormalExplicitImportConfigurator; |
24 |
import eu.etaxonomy.cdm.model.taxon.TaxonNode; |
|
23 | 25 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
24 | 26 |
|
25 | 27 |
|
... | ... | |
74 | 76 |
public void init(IWorkbench workbench, IStructuredSelection selection) { |
75 | 77 |
super.init(workbench, selection); |
76 | 78 |
configurator = CdmStore.getImportManager().NormalExplicitConfigurator(); |
79 |
if (selection instanceof TreeSelection && !selection.isEmpty()){ |
|
80 |
TaxonNode node = (TaxonNode)selection.getFirstElement(); |
|
81 |
configurator.setParentUUID(node.getTaxon().getUuid()); |
|
82 |
configurator.setClassificationUuid(node.getClassification().getUuid()); |
|
83 |
} |
|
77 | 84 |
} |
78 | 85 |
|
79 | 86 |
/* (non-Javadoc) |
Also available in: Unified diff
if calling excel import on a taxonnode this is used as parent taxon