import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
import eu.etaxonomy.taxeditor.model.IPartContentHasFactualData;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.preference.Resources;
import eu.etaxonomy.taxeditor.store.CdmStore;
viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
labelProvider = new ChecklistLabelProvider(this.viewer);
terms = labelProvider.getNamedAreas();
+ if (terms == null){
+ MessagingUtils.informationDialog("No Areas to display", "Please choose the areas you want to display. "
+ + "Therefore go to the preferences, choose the Checklist Editor and choose the areas in the Distribution Selection Wizard.");
+ this.dispose();
+ return;
+ }
filter = new ChecklistEditorFilter();
createTopComposite(parent);
loadDataInput();
private void createToolbarItems() {
dropListener = new ChecklistDropdownSelectionListener(toolItem, this, terms);
+
for (DefinedTermBase<DefinedTermBase> term : terms) {
if(term!=null){
dropListener.add(term);
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeSelection;
import org.eclipse.ui.IWorkbench;
import eu.etaxonomy.cdm.database.DbSchemaValidation;
import eu.etaxonomy.cdm.io.common.IImportConfigurator.SOURCE_TYPE;
import eu.etaxonomy.cdm.io.excel.taxa.NormalExplicitImportConfigurator;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.store.CdmStore;
public void init(IWorkbench workbench, IStructuredSelection selection) {
super.init(workbench, selection);
configurator = CdmStore.getImportManager().NormalExplicitConfigurator();
+ if (selection instanceof TreeSelection && !selection.isEmpty()){
+ TaxonNode node = (TaxonNode)selection.getFirstElement();
+ configurator.setParentUUID(node.getTaxon().getUuid());
+ configurator.setClassificationUuid(node.getClassification().getUuid());
+ }
}
/* (non-Javadoc)