if calling excel import on a taxonnode this is used as parent taxon
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / view / checklist / ChecklistEditor.java
index 6f4d65b2804533a3dcd55abf17b260e83bd79f4d..992f9d285c1976bc81f07531a1c8fcd4f00505aa 100644 (file)
@@ -73,6 +73,7 @@ import eu.etaxonomy.taxeditor.model.IContextListener;
 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;
@@ -228,6 +229,12 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
         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();
@@ -303,6 +310,7 @@ public class ChecklistEditor extends EditorPart implements ISelectionListener, I
 
        private void createToolbarItems() {
                dropListener = new ChecklistDropdownSelectionListener(toolItem, this, terms);
+               
         for (DefinedTermBase<DefinedTermBase> term : terms) {
             if(term!=null){
                 dropListener.add(term);