Revision 40e3002f
Added by Katja Luther over 7 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/ChecklistEditor.java | ||
---|---|---|
73 | 73 |
import eu.etaxonomy.taxeditor.model.IDirtyMarkable; |
74 | 74 |
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails; |
75 | 75 |
import eu.etaxonomy.taxeditor.model.IPartContentHasFactualData; |
76 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
|
76 | 77 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
77 | 78 |
import eu.etaxonomy.taxeditor.preference.Resources; |
78 | 79 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
... | ... | |
228 | 229 |
viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION); |
229 | 230 |
labelProvider = new ChecklistLabelProvider(this.viewer); |
230 | 231 |
terms = labelProvider.getNamedAreas(); |
232 |
if (terms == null){ |
|
233 |
MessagingUtils.informationDialog("No Areas to display", "Please choose the areas you want to display. " |
|
234 |
+ "Therefore go to the preferences, choose the Checklist Editor and choose the areas in the Distribution Selection Wizard."); |
|
235 |
this.dispose(); |
|
236 |
return; |
|
237 |
} |
|
231 | 238 |
filter = new ChecklistEditorFilter(); |
232 | 239 |
createTopComposite(parent); |
233 | 240 |
loadDataInput(); |
... | ... | |
303 | 310 |
|
304 | 311 |
private void createToolbarItems() { |
305 | 312 |
dropListener = new ChecklistDropdownSelectionListener(toolItem, this, terms); |
313 |
|
|
306 | 314 |
for (DefinedTermBase<DefinedTermBase> term : terms) { |
307 | 315 |
if(term!=null){ |
308 | 316 |
dropListener.add(term); |
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