Revision 10b4eb6d
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/CdmLightExportWizard.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.swt.SWT; |
19 | 20 |
import org.eclipse.swt.widgets.Combo; |
20 | 21 |
import org.eclipse.swt.widgets.Listener; |
21 | 22 |
import org.eclipse.ui.IWorkbench; |
22 | 23 |
import org.eclipse.ui.progress.IProgressConstants; |
23 | 24 |
|
25 |
import eu.etaxonomy.cdm.filter.TaxonNodeFilter; |
|
24 | 26 |
import eu.etaxonomy.cdm.io.cdmLight.CdmLightExportConfigurator; |
25 | 27 |
import eu.etaxonomy.cdm.model.taxon.Classification; |
28 |
import eu.etaxonomy.cdm.model.taxon.TaxonNode; |
|
26 | 29 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
27 | 30 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
28 | 31 |
|
... | ... | |
43 | 46 |
|
44 | 47 |
@Override |
45 | 48 |
public void init(IWorkbench workbench, IStructuredSelection selection) { |
46 |
configurator = new CdmLightExportConfigurator(null); |
|
49 |
configurator = new CdmLightExportConfigurator(null); |
|
50 |
if (selection instanceof TreeSelection && !selection.isEmpty()){ |
|
51 |
TaxonNode node = (TaxonNode)selection.getFirstElement(); |
|
52 |
configurator.setTaxonNodeFilter(TaxonNodeFilter.NewTaxonNodeInstance(node.getUuid())); |
|
53 |
|
|
54 |
} |
|
55 |
|
|
56 |
|
|
47 | 57 |
} |
48 | 58 |
|
49 | 59 |
|
... | ... | |
71 | 81 |
for(Classification c:listClassifications){ |
72 | 82 |
if(c.getTitleCache().equalsIgnoreCase(combo.getItem(selectionIndex))){ |
73 | 83 |
set.add(c.getUuid()); |
84 |
if (!page.getCheckUseSelectedTaxonNode()){ |
|
85 |
configurator.setTaxonNodeFilter(TaxonNodeFilter.NewClassificationInstance(c.getUuid())); |
|
86 |
} |
|
74 | 87 |
} |
75 | 88 |
} |
76 |
configurator.setClassificationUuids(set); |
|
89 |
|
|
77 | 90 |
|
78 | 91 |
} |
79 | 92 |
} |
Also available in: Unified diff
adapt export configurator for taxonnode filter (at first only for cdm light)