commit 880f539036c8d7c86c069fcdaac67a172841a5ba
Author: Andreas Müller <a.mueller@bgbm.org>
Date:   Fri Apr 2 00:11:46 2021 +0200

    ref #9541 refactor Open..Handlers to all use UuidAndTitleCache as input and some more changes and bugfixes

diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/defaultHandler/OpenBulkEditorForIdentifiableEntityE4.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/defaultHandler/OpenBulkEditorForIdentifiableEntityE4.java
index 9d7e358e2..377f4aff8 100644
--- a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/defaultHandler/OpenBulkEditorForIdentifiableEntityE4.java
+++ b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/defaultHandler/OpenBulkEditorForIdentifiableEntityE4.java
@@ -18,49 +18,34 @@ import eu.etaxonomy.cdm.model.name.TaxonName;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.cdm.persistence.dto.ReferencingObjectDto;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditorUtil;
 import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput;
 import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4;
 
-public class OpenBulkEditorForIdentifiableEntityE4 extends DefaultOpenHandlerBaseE4<Object>{
+public class OpenBulkEditorForIdentifiableEntityE4 extends DefaultOpenHandlerBaseE4<IdentifiableEntity, UuidAndTitleCache<IdentifiableEntity>>{
 
     @Override
-    protected void open(Object entity, Shell shell, EPartService partService) {
-        @SuppressWarnings("rawtypes")
-        AbstractBulkEditorInput input = null;
-        if (entity instanceof UuidAndTitleCache){
-            input = AbstractBulkEditorInput.NewInstance(((UuidAndTitleCache<?>)entity).getType(), ((UuidAndTitleCache<?>)entity).getUuid());
-        }else if (entity instanceof IdentifiableEntity){
-            input = AbstractBulkEditorInput.NewInstance((IdentifiableEntity)entity);
-        }
+    protected void open(UuidAndTitleCache<IdentifiableEntity> entity, Shell shell, EPartService partService) {
+        AbstractBulkEditorInput<?> input = AbstractBulkEditorInput.NewInstance(entity.getType(), entity.getUuid());
         BulkEditorUtil.openBulkEditor(input, modelService, partService, application);
     }
 
     @Override
-    protected boolean canExecute(Object entity) {
-        if (entity instanceof UuidAndTitleCache){
-            if (entity instanceof ReferencingObjectDto && ((ReferencingObjectDto) entity).getOpenInTarget() != null){
-                entity = ((ReferencingObjectDto) entity).getOpenInTarget();
-            }
-            Class<?> type = ((UuidAndTitleCache<?>)entity).getType();
+    protected boolean canExecute(UuidAndTitleCache<IdentifiableEntity> entity) {
+            Class<?> type = entity.getType();
             return (TaxonName.class.isAssignableFrom(type)
                     || AgentBase.class.isAssignableFrom(type)
                     || SpecimenOrObservationBase.class.isAssignableFrom(type)
                     || TaxonBase.class.isAssignableFrom(type)
                     || Reference.class.isAssignableFrom(type)
                     || Media.class.isAssignableFrom(type));
-        }
+    }
 
-        return entity instanceof Reference
-            || entity instanceof TaxonName
-            || entity instanceof AgentBase
-            || entity instanceof SpecimenOrObservationBase
-            || entity instanceof TaxonBase
-            || entity instanceof Media
-            ;
-   }
+    @Override
+    protected boolean allowsMultiple() {
+        return true;
+    }
 
     @Override
     protected String getPartId() {
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/defaultHandler/OpenBulkEditorForTaxonNodeHandler.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/defaultHandler/OpenBulkEditorForTaxonNodeHandler.java
index 124ca53e7..1bdb0ba6d 100644
--- a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/defaultHandler/OpenBulkEditorForTaxonNodeHandler.java
+++ b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/defaultHandler/OpenBulkEditorForTaxonNodeHandler.java
@@ -9,16 +9,16 @@
 package eu.etaxonomy.taxeditor.bulkeditor.handler.defaultHandler;
 
 import org.eclipse.e4.ui.workbench.modeling.EPartService;
-import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.swt.widgets.Shell;
 
+import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditorUtil;
 import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput;
 import eu.etaxonomy.taxeditor.bulkeditor.input.TaxonEditorInput;
 import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4;
 
-public class OpenBulkEditorForTaxonNodeHandler extends DefaultOpenHandlerBaseE4<TaxonNodeDto> {
+public class OpenBulkEditorForTaxonNodeHandler extends DefaultOpenHandlerBaseE4<ITaxonTreeNode, TaxonNodeDto> {
 
     @Override
     protected void open(TaxonNodeDto entity, Shell shell, EPartService partService) {
@@ -28,11 +28,13 @@ public class OpenBulkEditorForTaxonNodeHandler extends DefaultOpenHandlerBaseE4<
     }
 
     @Override
-    protected boolean canExecute(Object selection) {
-        if (((IStructuredSelection)selection).getFirstElement() instanceof TaxonNodeDto && ((IStructuredSelection)selection).size() == 1){
-            return ((TaxonNodeDto)((IStructuredSelection)selection).getFirstElement()).getTaxonUuid()!=null;
-        }
-        return false;
+    protected boolean canExecute(TaxonNodeDto selection) {
+        return selection.getTaxonUuid()!=null;
+    }
+
+    @Override
+    protected boolean allowsMultiple() {
+        return true;
     }
 
     @Override
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/e4/ReferencingObjectsViewE4.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/e4/ReferencingObjectsViewE4.java
index c975de410..4347b6e0c 100644
--- a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/e4/ReferencingObjectsViewE4.java
+++ b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/e4/ReferencingObjectsViewE4.java
@@ -235,6 +235,9 @@ public class ReferencingObjectsViewE4 extends AbstractCdmEditorPartE4 implements
 				    monitor.subTask("Load data from server");
 				    monitor.worked(1);
 	                Set<ReferencingObjectDto> refObjectsFromServer = loadReferencingObjects(entityUUID, objectClass);
+	                if (refObjectsFromServer == null){
+	                    return Status.CANCEL_STATUS;  //TODO is this correct?, null can happen e.g. if server call throws exception
+	                }
 	                monitor.worked(25);
 	                if(monitor.isCanceled()) {
 //	                  actualUuid = null;
@@ -246,7 +249,8 @@ public class ReferencingObjectsViewE4 extends AbstractCdmEditorPartE4 implements
 	                monitor.worked(1);//maybe this helps to update the subtask label
 
 	                //TODO have a status line instead
-	                updateDescriptionLabel(description + "(n="+referencingObjectsSet.size()+")"); //
+	                int count = referencingObjectsSet == null? 0: referencingObjectsSet.size();
+	                updateDescriptionLabel(CdmUtils.Nz(description) + "(n="+count+")"); //
 
 
 	                List<ReferencingObjectDto> localDtos = sortToList(referencingObjectsSet, monitor);
@@ -479,7 +483,8 @@ public class ReferencingObjectsViewE4 extends AbstractCdmEditorPartE4 implements
 			firstElement = ((TaxonNode)firstElement).getClassification();
 		}
 		if(firstElement instanceof CdmBase){
-		    CdmBase referencedCdmObject = (CdmBase) firstElement;
+		    firstElement= CdmBase.deproxy(firstElement, CdmBase.class);
+		    CdmBase referencedCdmObject = (CdmBase)firstElement;
 		    if (referencedCdmObject.getUuid() == actualUuid){
 		        return;
 		    }
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorUtil.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorUtil.java
index d809fc4a9..e39dd38ec 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorUtil.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorUtil.java
@@ -39,7 +39,6 @@ import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
-import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.bulkeditor.e4.BulkEditorE4;
 import eu.etaxonomy.taxeditor.bulkeditor.input.TaxonEditorInput;
 import eu.etaxonomy.taxeditor.editor.descriptiveDataSet.DescriptiveDataSetEditor;
@@ -104,17 +103,7 @@ public class EditorUtil extends AbstractUtility {
         editor.init(descriptiveDataSetUuid, true);
     }
 
-    public static void openDistributionEditor(UuidAndTitleCache parentUuidAndTitleCache, EModelService modelService, EPartService partService, MApplication application){
-        Collection<MPart> parts = partService.getParts();
-        String partId = AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_VIEW_CHECKLIST_E4_DISTRIBUTIONEDITORPART;
-        checkAndCloseFactsAndMediaParts(partService);
-        MPart part = showPart(partId, modelService, partService, application);
-        DistributionEditorPart editor = (DistributionEditorPart) part.getObject();
-        editor.init(parentUuidAndTitleCache);
-    }
-
-    public static void openDistributionEditor(List<UuidAndTitleCache> parentTaxonUuidList, EModelService modelService, EPartService partService, MApplication application){
-        Collection<MPart> parts = partService.getParts();
+    public static void openDistributionEditor(List<TaxonNodeDto> parentTaxonUuidList, EModelService modelService, EPartService partService, MApplication application){
         String partId = AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_VIEW_CHECKLIST_E4_DISTRIBUTIONEDITORPART;
         checkAndCloseFactsAndMediaParts(partService);
         MPart part = showPart(partId, modelService, partService, application);
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/handler/OpenCharacterMatrixHandler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/handler/OpenCharacterMatrixHandler.java
index 6f2c89d33..5fb704264 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/handler/OpenCharacterMatrixHandler.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/handler/OpenCharacterMatrixHandler.java
@@ -12,20 +12,21 @@ import org.eclipse.e4.ui.workbench.modeling.EPartService;
 import org.eclipse.swt.widgets.Shell;
 
 import eu.etaxonomy.cdm.model.description.DescriptiveDataSet;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.editor.AppModelId;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4;
 
-public class OpenCharacterMatrixHandler extends DefaultOpenHandlerBaseE4<DescriptiveDataSet>{
+public class OpenCharacterMatrixHandler extends DefaultOpenHandlerBaseE4<DescriptiveDataSet, UuidAndTitleCache<DescriptiveDataSet>>{
 
     @Override
-    protected void open(DescriptiveDataSet entity, Shell shell, EPartService partService) {
+    protected void open(UuidAndTitleCache<DescriptiveDataSet> entity, Shell shell, EPartService partService) {
         EditorUtil.openCharacterMatrix(entity.getUuid(), modelService, partService, application);
     }
 
     @Override
-    protected boolean canExecute(Object entity) {
-        return true;
+    protected boolean canExecute(UuidAndTitleCache<DescriptiveDataSet> entity) {
+        return DescriptiveDataSet.class.isAssignableFrom(entity.getType());
     }
 
     @Override
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/handler/OpenDescriptiveDataSetEditorHandler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/handler/OpenDescriptiveDataSetEditorHandler.java
index 52d49cc7b..d1edd4aed 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/handler/OpenDescriptiveDataSetEditorHandler.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/handler/OpenDescriptiveDataSetEditorHandler.java
@@ -12,28 +12,21 @@ import org.eclipse.e4.ui.workbench.modeling.EPartService;
 import org.eclipse.swt.widgets.Shell;
 
 import eu.etaxonomy.cdm.model.description.DescriptiveDataSet;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.editor.AppModelId;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4;
 
-public class OpenDescriptiveDataSetEditorHandler extends DefaultOpenHandlerBaseE4<DescriptiveDataSet>{
-
-    /**
-     * {@inheritDoc}
-     */
-//    @Override
-//    protected DescriptiveDataSet getEntity(UUID uuid) {
-//        return CdmStore.getService(IDescriptiveDataSetService.class).load(uuid);
-//    }
+public class OpenDescriptiveDataSetEditorHandler extends DefaultOpenHandlerBaseE4<DescriptiveDataSet, UuidAndTitleCache<DescriptiveDataSet>>{
 
     @Override
-    protected void open(DescriptiveDataSet entity, Shell shell, EPartService partService) {
+    protected void open(UuidAndTitleCache<DescriptiveDataSet> entity, Shell shell, EPartService partService) {
         EditorUtil.openDescriptiveDataSetEditor(entity.getUuid(), modelService, partService, application);
     }
 
     @Override
-    protected boolean canExecute(Object entity) {
-        return true;
+    protected boolean canExecute(UuidAndTitleCache<DescriptiveDataSet> entity) {
+        return DescriptiveDataSet.class.isAssignableFrom(entity.getType());
     }
 
     @Override
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenSpecimenEditorForTypeSpecimenHandler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenSpecimenEditorForTypeSpecimenHandler.java
index bff3ab90f..36b7fba41 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenSpecimenEditorForTypeSpecimenHandler.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenSpecimenEditorForTypeSpecimenHandler.java
@@ -8,24 +8,41 @@
 */
 package eu.etaxonomy.taxeditor.editor.handler.defaultHandler;
 
+import java.util.UUID;
+
 import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.e4.ui.workbench.modeling.EPartService;
 import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState;
 import org.eclipse.swt.widgets.Shell;
 
+import eu.etaxonomy.cdm.api.service.INameService;
 import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.editor.AppModelId;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
 import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4;
+import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
+import eu.etaxonomy.taxeditor.view.DtoWithEntity;
 
+/**
+ * Note AM: not yet found out what this is for
+ */
 public class DefaultOpenSpecimenEditorForTypeSpecimenHandler
-        extends DefaultOpenHandlerBaseE4<SpecimenTypeDesignation> {
+        extends DefaultOpenHandlerBaseE4<SpecimenTypeDesignation, UuidAndTitleCache<SpecimenTypeDesignation>> {
 
 	@Override
-	protected void open(SpecimenTypeDesignation entity, Shell shell, EPartService partService) {
-	    DerivateViewEditorInput input = new DerivateViewEditorInput(entity.getTypeSpecimen().getUuid());
+	protected void open(UuidAndTitleCache<SpecimenTypeDesignation> entity, Shell shell, EPartService partService) {
+	    UUID uuidSpecimen;
+	    if (entity instanceof DtoWithEntity){
+	        uuidSpecimen = ((DtoWithEntity<SpecimenTypeDesignation>)entity).getEntity().getTypeSpecimen().getUuid();
+	    }else{
+	        SpecimenTypeDesignation std = (SpecimenTypeDesignation)CdmStore.getService(INameService.class).loadTypeDesignation(entity.getUuid(), null);
+	        uuidSpecimen = std.getTypeSpecimen().getUuid();
+	    }
+
+	    DerivateViewEditorInput input = new DerivateViewEditorInput(uuidSpecimen);
 	    MPart part = TaxeditorStorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getService(EPartService.class).showPart(
 	            AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_VIEW_DERIVATE_DERIVATEVIEW, PartState.ACTIVATE);
 	    DerivateView derivateView = (DerivateView) part.getObject();
@@ -33,8 +50,8 @@ public class DefaultOpenSpecimenEditorForTypeSpecimenHandler
 	}
 
     @Override
-    protected boolean canExecute(Object entity) {
-        return true;
+    protected boolean canExecute(UuidAndTitleCache<SpecimenTypeDesignation> entity) {
+        return SpecimenTypeDesignation.class.isAssignableFrom(entity.getType());
     }
 
     @Override
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenTaxonEditorForTaxonBaseHandler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenTaxonEditorForTaxonBaseHandler.java
index 91a731efc..4e84c6c23 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenTaxonEditorForTaxonBaseHandler.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenTaxonEditorForTaxonBaseHandler.java
@@ -14,57 +14,24 @@ import org.eclipse.e4.ui.workbench.modeling.EPartService;
 import org.eclipse.swt.widgets.Shell;
 
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.cdm.persistence.dto.ReferencingObjectDto;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.editor.AppModelId;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4;
 
 public class DefaultOpenTaxonEditorForTaxonBaseHandler
-        extends DefaultOpenHandlerBaseE4<Object> {
+        extends DefaultOpenHandlerBaseE4<TaxonBase, UuidAndTitleCache<TaxonBase>> {
 
     @Override
-    protected void open(Object entity, Shell shell, EPartService partService) throws Exception {
-        if (entity instanceof TaxonBase){
-            EditorUtil.openTaxonBaseE4(((TaxonBase<?>)entity).getUuid(), modelService, partService, application);
-        }else if (entity instanceof UuidAndTitleCache){
-            UUID uuid = getTaxonUuid((UuidAndTitleCache<?>)entity);
-            EditorUtil.openTaxonBaseE4(uuid, modelService, partService, application);
-        }else{
-            throw new Exception("Only objects of type taxonbase can be handled.");
-        }
-    }
-
-    private UUID getTaxonUuid(UuidAndTitleCache<?> dto) {
-        dto = getTarget(dto);
-        if (TaxonBase.class.isAssignableFrom(dto.getType())){
-            return dto.getUuid();
-//        }else if (SecundumSource.class.isAssignableFrom(dto.getType())) {
-//            //TODO use entity directly from RefObjectDto (but currently not available here)
-//            SecundumSource source = CdmStore.getCommonService().find(SecundumSource.class, dto.getUuid());
-//            return source.getSourcedTaxon().getUuid();
-        }else {
-            return dto.getUuid();  //to avoid NPE at this point
-        }
-    }
-
-    private UuidAndTitleCache<?> getTarget(UuidAndTitleCache<?> entity) {
-        if (entity instanceof ReferencingObjectDto){
-            ReferencingObjectDto dto = (ReferencingObjectDto)entity;
-            entity = dto.getOpenInTarget() != null ? dto.getOpenInTarget() : entity;
-        }
-        return entity;
+    protected void open(UuidAndTitleCache<TaxonBase> entity, Shell shell, EPartService partService) throws Exception {
+        UUID uuid = entity.getUuid();
+        EditorUtil.openTaxonBaseE4(uuid, modelService, partService, application);
     }
 
     @Override
-    protected boolean canExecute(Object entity) {
-        if (entity instanceof TaxonBase){
+    protected boolean canExecute(UuidAndTitleCache<TaxonBase> entity) {
+        if (TaxonBase.class.isAssignableFrom(entity.getType())) {
             return true;
-        } else if (entity instanceof UuidAndTitleCache){
-            UuidAndTitleCache<?> dto = getTarget((UuidAndTitleCache<?>)entity);
-            if (TaxonBase.class.isAssignableFrom(dto.getType())) {
-                return true;
-            }
         }
         return false;
     }
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenTaxonEditorForTaxonNodeHandler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenTaxonEditorForTaxonNodeHandler.java
index f3a3ec855..a44e35fb4 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenTaxonEditorForTaxonNodeHandler.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/defaultHandler/DefaultOpenTaxonEditorForTaxonNodeHandler.java
@@ -9,9 +9,9 @@
 package eu.etaxonomy.taxeditor.editor.handler.defaultHandler;
 
 import org.eclipse.e4.ui.workbench.modeling.EPartService;
-import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.swt.widgets.Shell;
 
+import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
 import eu.etaxonomy.taxeditor.editor.AppModelId;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
@@ -20,7 +20,7 @@ import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 
 public class DefaultOpenTaxonEditorForTaxonNodeHandler
-        extends DefaultOpenHandlerBaseE4<TaxonNodeDto> {
+        extends DefaultOpenHandlerBaseE4<ITaxonTreeNode, TaxonNodeDto> {
 
     @Override
     protected void open(TaxonNodeDto entity, Shell shell, EPartService partService) {
@@ -32,12 +32,8 @@ public class DefaultOpenTaxonEditorForTaxonNodeHandler
     }
 
     @Override
-    protected boolean canExecute(Object selection) {
-        if (selection instanceof IStructuredSelection &&
-                ((IStructuredSelection)selection).getFirstElement() instanceof TaxonNodeDto){
-            return ((TaxonNodeDto)((IStructuredSelection)selection).getFirstElement()).getTaxonUuid() != null;
-        }
-        return false ;
+    protected boolean canExecute(TaxonNodeDto selection) {
+        return selection.getTaxonUuid() != null;
 //        boolean hasPermission = CdmStore.currentAuthentiationHasPermission(entity, Operation.UPDATE);
 //        return hasPermission && entity.getTaxon()!=null ;
     }
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/DistributionEditorPart.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/DistributionEditorPart.java
index 5dc908b28..259bdc096 100755
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/DistributionEditorPart.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/DistributionEditorPart.java
@@ -21,7 +21,6 @@ import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 import javax.inject.Inject;
 
-import eu.etaxonomy.cdm.compare.taxon.TaxonNodeSortMode;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.e4.core.contexts.ContextInjectionFactory;
 import org.eclipse.e4.core.contexts.IEclipseContext;
@@ -42,11 +41,12 @@ import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
 import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.api.service.UpdateResult;
 import eu.etaxonomy.cdm.api.service.dto.TaxonDistributionDTO;
+import eu.etaxonomy.cdm.compare.taxon.TaxonNodeSortMode;
 import eu.etaxonomy.cdm.model.description.DescriptionBase;
 import eu.etaxonomy.cdm.model.description.TaxonDescription;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.persistence.dto.MergeResult;
-import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
+import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.IDistributionEditorPart;
@@ -126,23 +126,8 @@ public class DistributionEditorPart
         ContextInjectionFactory.inject(editor, context);
     }
 
-    public void init(UuidAndTitleCache nodeDto) {
-        List<UUID> uuidList = new ArrayList<>();
-        uuidList.add(nodeDto.getUuid());
-        this.taxonList = CdmStore.getService(ITaxonNodeService.class).getTaxonDistributionDTO(uuidList, TAXONNODE_PROPERTY_PATH, true);
-       // taxonList.stream().filter(taxonDistribution ->  CdmStore.currentAuthentiationHasPermission(taxonDistribution.getTaxonUuid(), RequiredPermissions.TAXONNODE_EDIT));
-
-
-        if(taxonList!=null){
-            editor.loadDistributions(taxonList);
-            editor.createTable();
-            editor.pack();
-            stackLayout.topControl = editor;
-            editor.getParent().layout();
-        }
-    }
+    public void init(List<TaxonNodeDto> uuidAndTitleCaches) {
 
-    public void init(List<UuidAndTitleCache> uuidAndTitleCaches) {
         List<UUID> nodeUuids = new ArrayList<>();
         uuidAndTitleCaches.forEach(element -> nodeUuids.add(element.getUuid()));
 
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/handler/OpenChecklistEditorHandlerE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/handler/OpenChecklistEditorHandlerE4.java
index 277a5f195..6eba843ee 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/handler/OpenChecklistEditorHandlerE4.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/handler/OpenChecklistEditorHandlerE4.java
@@ -22,8 +22,9 @@ import org.eclipse.swt.widgets.Shell;
 import eu.etaxonomy.cdm.model.description.Distribution;
 import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
 import eu.etaxonomy.cdm.model.permission.Operation;
+import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
+import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
 import eu.etaxonomy.taxeditor.editor.AppModelId;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenSetBaseHandler;
@@ -31,17 +32,13 @@ import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.security.RequiredPermissions;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
-public class OpenChecklistEditorHandlerE4 extends DefaultOpenSetBaseHandler<List<UuidAndTitleCache>> {
-    @Inject
-    private Logger logger;
-    private static final String COULD_NOT_OPEN_DISTRIBUTION_EDITOR_THE_HIERARCHY_IS_CORRUPTED = Messages.OpenChecklistEditorHandler_COULD_NOT_OPEN_MESSAGE;
-    private static final String COULD_NOT_OPEN_DISTRIBUTION_EDITOR = Messages.OpenChecklistEditorHandler_COULD_NOT_OPEN_TITLE;
-
-
+/**
+ * Handler to open the distribution editor via context menu
+ */
+public class OpenChecklistEditorHandlerE4 extends DefaultOpenSetBaseHandler<ITaxonTreeNode, TaxonNodeDto> {
 
 	@Override
-	protected void open(List<UuidAndTitleCache> entities, Shell shell, EPartService partService) {
-
+    protected void open(List<TaxonNodeDto> entities, Shell shell, EPartService partService) {
 	    EditorUtil.openDistributionEditor(entities, modelService, partService, application);
 	}
 
@@ -83,8 +80,8 @@ public class OpenChecklistEditorHandlerE4 extends DefaultOpenSetBaseHandler<List
     }
 
     @Override
-    protected boolean canExecute(Object entity) {
-        // TODO Auto-generated method stub
+    protected boolean canExecute(TaxonNodeDto entity) {
+        //FIXME DTO
         return true;
     }
 }
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForDescriptionElement.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForDescriptionElement.java
index bf386284b..2ca6c19bf 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForDescriptionElement.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForDescriptionElement.java
@@ -22,16 +22,20 @@ import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
 import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.view.DtoWithEntity;
 
-public class OpenDerivativeEditorForDescriptionElement extends DefaultOpenHandlerBaseE4<IndividualsAssociation> {
+/**
+ * Handler to open specimen e.g. from factual data view
+ */
+public class OpenDerivativeEditorForDescriptionElement extends DefaultOpenHandlerBaseE4<IndividualsAssociation, DtoWithEntity<IndividualsAssociation>> {
 
     @Override
-    protected void open(IndividualsAssociation entity, Shell shell, EPartService partService) {
-    	if(entity==null || entity.getAssociatedSpecimenOrObservation()==null){
+    protected void open(DtoWithEntity<IndividualsAssociation> entity, Shell shell, EPartService partService) {
+    	if(entity==null || entity.getEntity().getAssociatedSpecimenOrObservation()==null){
     		MessagingUtils.messageDialog(Messages.OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS, this, Messages.OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS_MESSAGE);
     		return;
     	}
-        SpecimenOrObservationBase<?> associatedSpecimenOrObservation = entity.getAssociatedSpecimenOrObservation();
+        SpecimenOrObservationBase<?> associatedSpecimenOrObservation = entity.getEntity().getAssociatedSpecimenOrObservation();
         if(associatedSpecimenOrObservation!=null){
             UUID specimenUuid = associatedSpecimenOrObservation.getUuid();
             EditorUtil.openSpecimenEditor(new DerivateViewEditorInput(Collections.singletonList(specimenUuid)), modelService, partService, application);
@@ -39,8 +43,8 @@ public class OpenDerivativeEditorForDescriptionElement extends DefaultOpenHandle
     }
 
     @Override
-    protected boolean canExecute(Object entity) {
-        return true;
+    protected boolean canExecute(DtoWithEntity<IndividualsAssociation> entity) {
+        return IndividualsAssociation.class.isAssignableFrom(entity.getType());
     }
 
     @Override
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForGatheringEvent.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForGatheringEvent.java
index 9ab069955..fcea900c2 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForGatheringEvent.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForGatheringEvent.java
@@ -19,6 +19,7 @@ import org.eclipse.swt.widgets.Shell;
 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
 import eu.etaxonomy.cdm.model.occurrence.GatheringEvent;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.editor.AppModelId;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.l10n.Messages;
@@ -26,13 +27,13 @@ import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
 import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
-public class OpenDerivativeEditorForGatheringEvent extends DefaultOpenHandlerBaseE4<GatheringEvent> {
+public class OpenDerivativeEditorForGatheringEvent extends DefaultOpenHandlerBaseE4<GatheringEvent, UuidAndTitleCache<GatheringEvent>> {
 
     protected static final String OPEN_DERIVATIVE_EDITOR_FOR_TAXON_NODE_COULD_NOT_OPEN = Messages.OpenDerivativeEditorForTaxonNode_COULD_NOT_OPEN;
 
     @Override
-    protected void open(GatheringEvent entity, Shell shell, EPartService partService) {
-        Collection<UUID> specimenUuids = new ArrayList<UUID>();
+    protected void open(UuidAndTitleCache<GatheringEvent> entity, Shell shell, EPartService partService) {
+        Collection<UUID> specimenUuids = new ArrayList<>();
         List<FieldUnit> fieldUnits = CdmStore.getService(IOccurrenceService.class).findFieldUnitsForGatheringEvent(entity.getUuid());
         fieldUnits.forEach(fieldUnit->specimenUuids.add(fieldUnit.getUuid()));
         DerivateViewEditorInput input = new DerivateViewEditorInput(specimenUuids);
@@ -40,8 +41,8 @@ public class OpenDerivativeEditorForGatheringEvent extends DefaultOpenHandlerBas
     }
 
     @Override
-    protected boolean canExecute(Object entity) {
-        return true;
+    protected boolean canExecute(UuidAndTitleCache<GatheringEvent> entity) {
+        return GatheringEvent.class.isAssignableFrom(entity.getType());
     }
 
     @Override
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForSpecimenOrOBservationBase.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForSpecimenOrOBservationBase.java
index ed409a820..2bd2037b3 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForSpecimenOrOBservationBase.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForSpecimenOrOBservationBase.java
@@ -12,32 +12,28 @@ import org.eclipse.e4.ui.workbench.modeling.EPartService;
 import org.eclipse.swt.widgets.Shell;
 
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.editor.AppModelId;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
 import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4;
 
-public class OpenDerivativeEditorForSpecimenOrOBservationBase extends DefaultOpenHandlerBaseE4<SpecimenOrObservationBase<?>>{
+public class OpenDerivativeEditorForSpecimenOrOBservationBase extends DefaultOpenHandlerBaseE4<SpecimenOrObservationBase, UuidAndTitleCache<SpecimenOrObservationBase>>{
 
     protected static final String OPEN_DERIVATIVE_EDITOR_FOR_TAXON_NODE_COULD_NOT_OPEN = Messages.OpenDerivativeEditorForTaxonNode_COULD_NOT_OPEN;
 
-//    @Override
-//    protected SpecimenOrObservationBase<?> getEntity(UUID uuid) {
-//        return CdmStore.getService(IOccurrenceService.class).load(uuid);
-//    }
-
     @Override
-    protected void open(SpecimenOrObservationBase<?> entity, Shell shell, EPartService partService) {
+    protected void open(UuidAndTitleCache<SpecimenOrObservationBase> entity, Shell shell, EPartService partService) {
         DerivateViewEditorInput input = new DerivateViewEditorInput(entity.getUuid());
         EditorUtil.openSpecimenEditor(input, modelService, partService, application);
     }
 
     @Override
-    protected boolean canExecute(Object entity) {
+    protected boolean canExecute(UuidAndTitleCache<SpecimenOrObservationBase> entity) {
         //FIXME E4 when bulk editor is migrated then move the handler scope to the bulk editor part descriptor
         //in the model fragment
-        return true;
+        return SpecimenOrObservationBase.class.isAssignableFrom(entity.getType());
     }
 
     @Override
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForTaxonNode.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForTaxonNode.java
index f6d15ff50..b7a3f1bfa 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForTaxonNode.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForTaxonNode.java
@@ -14,13 +14,13 @@ import java.util.List;
 import java.util.UUID;
 
 import org.eclipse.e4.ui.workbench.modeling.EPartService;
-import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.swt.widgets.Shell;
 
 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.api.service.config.FindOccurrencesConfigurator;
 import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
+import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
 import eu.etaxonomy.taxeditor.editor.AppModelId;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
@@ -30,7 +30,7 @@ import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
-public class OpenDerivativeEditorForTaxonNode extends DefaultOpenHandlerBaseE4<TaxonNodeDto> {
+public class OpenDerivativeEditorForTaxonNode extends DefaultOpenHandlerBaseE4<ITaxonTreeNode, TaxonNodeDto> {
 
     protected static final String OPEN_DERIVATIVE_EDITOR_FOR_TAXON_NODE_COULD_NOT_OPEN = Messages.OpenDerivativeEditorForTaxonNode_COULD_NOT_OPEN;
 
@@ -49,11 +49,8 @@ public class OpenDerivativeEditorForTaxonNode extends DefaultOpenHandlerBaseE4<T
     }
 
     @Override
-    protected boolean canExecute(Object selection) {
-        if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).getFirstElement() instanceof TaxonNodeDto && ((IStructuredSelection)selection).size() == 1){
-            return (((TaxonNodeDto)((IStructuredSelection)selection).getFirstElement()).getTaxonUuid()!=null && PreferencesUtil.getBooleanValue(PreferencePredicate.ShowSpecimen.getKey()));
-        }
-        return false;
+    protected boolean canExecute(TaxonNodeDto selection) {
+        return selection.getTaxonUuid()!=null && PreferencesUtil.getBooleanValue(PreferencePredicate.ShowSpecimen.getKey());
     }
 
     @Override
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/OpenReferencingObjectsViewHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/OpenReferencingObjectsViewHandler.java
index 06dd8bf2a..d7bba594d 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/OpenReferencingObjectsViewHandler.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/OpenReferencingObjectsViewHandler.java
@@ -1,6 +1,6 @@
 package eu.etaxonomy.taxeditor.handler.defaultHandler;
 
-import java.util.UUID;
+import java.util.List;
 
 import javax.inject.Named;
 
@@ -11,37 +11,27 @@ import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
 import org.eclipse.e4.ui.services.IServiceConstants;
 import org.eclipse.e4.ui.workbench.modeling.EPartService;
 import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState;
-import org.eclipse.jface.viewers.IStructuredSelection;
 
-import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.bulkeditor.AppModelId;
 import eu.etaxonomy.taxeditor.editor.IReferencingObjectsView;
+import eu.etaxonomy.taxeditor.view.CdmViewerUtilE4;
 
 public class OpenReferencingObjectsViewHandler {
 
-    Object selectedObject;
+    List<UuidAndTitleCache<? extends ICdmBase>> selectedObjectList;
+
     @Execute
     public void execute(EPartService partService) {
 
         MPart part = partService.createPart(AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_BULKEDITOR_REFERENCINGOBJECTS_E4_REFERENCINGOBJECTSVIEWE4);
         part = partService.showPart(part, PartState.ACTIVATE);
         IReferencingObjectsView view = (IReferencingObjectsView)part.getObject();
-        UUID uuid = null;
-        Class clazz = null;
 
-        if (selectedObject instanceof IStructuredSelection){
-            selectedObject = ((IStructuredSelection)selectedObject).getFirstElement();
-        }
-        if (selectedObject instanceof CdmBase){
-            uuid = ((CdmBase)selectedObject).getUuid();
-            clazz = selectedObject.getClass();
-        } else if (selectedObject instanceof UuidAndTitleCache){
-            uuid = ((UuidAndTitleCache)selectedObject).getUuid();
-            clazz = ((UuidAndTitleCache)selectedObject).getType();
-        }
-        if (uuid != null && clazz != null){
-            view.updateReferencingObjects(uuid, clazz);
+        if (selectedObjectList != null && !selectedObjectList.isEmpty()) {
+            UuidAndTitleCache<? extends ICdmBase> dto = selectedObjectList.get(0);
+            view.updateReferencingObjects(dto.getUuid(), dto.getType());
         }
     }
 
@@ -51,15 +41,18 @@ public class OpenReferencingObjectsViewHandler {
             MHandledMenuItem menuItem) {
         boolean canExecute = false;
         MPart part = partService.findPart(AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_BULKEDITOR_REFERENCINGOBJECTS_E4_REFERENCINGOBJECTSVIEWE4);
-        canExecute = !part.equals(activePart);
+        canExecute = part.equals(activePart)  //we explicitly want to allow calling the view recursively
+                || part.getObject() == null ;  //we show the menu item only if the view is not yet open (otherwise by setting the focus data will be shown anyway
+                                               //but this may change in future for some data where explicitly calling the view is required
+
 
 
+        selectedObjectList = null;
         if (canExecute){
             String commandId = menuItem.getCommand().getElementId();
-            selectedObject = menuItem.getTransientData().get(commandId+".uuid");
-            if (selectedObject instanceof IStructuredSelection){
-                canExecute = ((IStructuredSelection)selectedObject).size() == 1;
-            }
+            Object selectedObject = menuItem.getTransientData().get(commandId+".uuid");
+            selectedObjectList = CdmViewerUtilE4.transformSelectionToUuidAndTitleCacheList(selectedObject);
+            canExecute = selectedObjectList.size() == 1;
         }
         menuItem.setVisible(canExecute);
         return canExecute;
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenClassificationWizardHandlerE4.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenClassificationWizardHandlerE4.java
index 539c9740f..a2ffb9c38 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenClassificationWizardHandlerE4.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenClassificationWizardHandlerE4.java
@@ -9,16 +9,19 @@
 package eu.etaxonomy.taxeditor.handler.defaultHandler.e4;
 
 import org.eclipse.e4.ui.workbench.modeling.EPartService;
-import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.swt.widgets.Shell;
 
 import eu.etaxonomy.cdm.api.service.IClassificationService;
+import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
 import eu.etaxonomy.taxeditor.newWizard.NewClassificationWizard;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
-public class DefaultOpenClassificationWizardHandlerE4 extends DefaultOpenHandlerBaseE4<TaxonNodeDto> {
+/**
+ * Handler to open Classification Wizard from taxon navigator
+ */
+public class DefaultOpenClassificationWizardHandlerE4 extends DefaultOpenHandlerBaseE4<ITaxonTreeNode, TaxonNodeDto> {
 
     @Override
     protected void open(TaxonNodeDto entity, Shell shell, EPartService partService) {
@@ -30,10 +33,7 @@ public class DefaultOpenClassificationWizardHandlerE4 extends DefaultOpenHandler
     }
 
     @Override
-    protected boolean canExecute(Object selection) {
-        if (((IStructuredSelection)selection).getFirstElement() instanceof TaxonNodeDto){
-            return ((TaxonNodeDto)((IStructuredSelection)selection).getFirstElement()).getTaxonUuid() == null;
-        }
-        return false;
+    protected boolean canExecute(TaxonNodeDto selection) {
+        return selection.getTaxonUuid() == null;  //only root notes have no taxon
     }
 }
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenHandlerBaseE4.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenHandlerBaseE4.java
index f381ad8cb..70afae833 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenHandlerBaseE4.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenHandlerBaseE4.java
@@ -8,6 +8,8 @@
 */
 package eu.etaxonomy.taxeditor.handler.defaultHandler.e4;
 
+import java.util.List;
+
 import javax.inject.Named;
 
 import org.eclipse.e4.core.contexts.IEclipseContext;
@@ -19,13 +21,13 @@ import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
 import org.eclipse.e4.ui.services.IServiceConstants;
 import org.eclipse.e4.ui.workbench.modeling.EModelService;
 import org.eclipse.e4.ui.workbench.modeling.EPartService;
-import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.swt.widgets.Shell;
 
-import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
+import eu.etaxonomy.taxeditor.view.CdmViewerUtilE4;
 
-public abstract class DefaultOpenHandlerBaseE4 <T> {
+public abstract class DefaultOpenHandlerBaseE4<S extends ICdmBase, T extends UuidAndTitleCache<S>> {
 
     protected IEclipseContext context;
     protected MApplication application;
@@ -43,37 +45,60 @@ public abstract class DefaultOpenHandlerBaseE4 <T> {
         String commandId = menuItem.getCommand().getElementId();
         Object transientData = menuItem.getTransientData().get(commandId+".uuid");
 
-        if (transientData instanceof IStructuredSelection){
-            for (Object element: ((IStructuredSelection)transientData).toArray()) {
-               open((T)element, shell, partService);
+        //FIXME DTO
+        List<T> uuidList = (List<T>)CdmViewerUtilE4.transformSelectionToUuidAndTitleCacheList(transientData);
+
+        handleUuidList(shell, partService, uuidList);
+    }
+
+    protected void handleUuidList(Shell shell, EPartService partService, List<T> uuidList) throws Exception {
+        if (this.allowsMultiple()){
+            for (T uuid : uuidList){
+                open(uuid, shell, partService);
             }
-        }else if (transientData instanceof UuidAndTitleCache || transientData instanceof CdmBase){
-            open((T)transientData, shell, partService);
+        }else if (!uuidList.isEmpty()){
+            open(uuidList.get(0), shell, partService);
         }
     }
 
     @CanExecute
     public boolean canExecute(MHandledMenuItem menuItem,
             @Named(IServiceConstants.ACTIVE_PART) MPart activePart) {
-        boolean canExecute = false;
 
         //check if same part
         String partId = getPartId();
         //check for correct entity
         String commandId = menuItem.getCommand().getElementId();
         Object transientData = menuItem.getTransientData().get(commandId+".uuid");
-        if(transientData instanceof IStructuredSelection || transientData instanceof UuidAndTitleCache || transientData instanceof CdmBase){
-            canExecute = canExecute(transientData)
-                    && (partId!=null?!partId.equals(activePart.getElementId()):true);
-        }
+
+        //FIXME DTO casting
+        List<T> uuidList = (List<T>)CdmViewerUtilE4.transformSelectionToUuidAndTitleCacheList(transientData);
+        boolean canExecute = partId!=null? !partId.equals(activePart.getElementId()):true;
+        canExecute &= canExecuteHandleList(uuidList);
 
         menuItem.setVisible(canExecute);
         return canExecute;
     }
 
+    public boolean canExecuteHandleList(List<T> uuidList) {
+        boolean canExecute = false;
+        for (T uuid : uuidList){
+            canExecute |= canExecute(uuid);
+        }
+        return canExecute;
+    }
+
+
     protected abstract void open(T entity, Shell shell, EPartService partService) throws Exception;
 
-    protected abstract boolean canExecute(Object entity);
+    protected abstract boolean canExecute(T entity);
+
+    /**
+     * subclasses should override this if it is allowed to open multiple editors in parallel
+     */
+    protected boolean allowsMultiple(){
+        return false;
+    }
 
     /**
      * Returns the part id for the part this handler opens.<br>
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenSetBaseHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenSetBaseHandler.java
index a58601ec5..e122bd2d4 100755
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenSetBaseHandler.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenSetBaseHandler.java
@@ -8,52 +8,39 @@
 */
 package eu.etaxonomy.taxeditor.handler.defaultHandler.e4;
 
-import java.util.ArrayList;
 import java.util.List;
 
-import javax.inject.Named;
-
-import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.e4.core.di.annotations.Execute;
-import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
-import org.eclipse.e4.ui.services.IServiceConstants;
-import org.eclipse.e4.ui.workbench.modeling.EModelService;
 import org.eclipse.e4.ui.workbench.modeling.EPartService;
-import org.eclipse.jface.viewers.TreeSelection;
 import org.eclipse.swt.widgets.Shell;
 
+import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 
 /**
  * @author k.luther
  * @since Feb 20, 2020
  */
-public abstract class DefaultOpenSetBaseHandler<S> extends DefaultOpenHandlerBaseE4<S> {
+public abstract class DefaultOpenSetBaseHandler<S extends ICdmBase, T extends UuidAndTitleCache<S>>
+            extends DefaultOpenHandlerBaseE4<S, T> {
 
     @Override
-    @Execute
-    public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell, MHandledMenuItem menuItem,
-            EModelService modelService, EPartService partService, MApplication application,
-            IEclipseContext context) throws Exception {
-        this.context = context;
-        this.modelService = modelService;
-        this.application = application;
-
-        String commandId = menuItem.getCommand().getElementId();
-        Object transientData = menuItem.getTransientData().get(commandId+".uuid");
-        S list = null;
-        if(transientData instanceof TreeSelection){
-            list = (S) ((TreeSelection)transientData).toList();
-
-        }else if (transientData instanceof UuidAndTitleCache){
-            List<UuidAndTitleCache> uuidList = new ArrayList<>();
-            uuidList.add((UuidAndTitleCache)transientData);
-            list = (S)uuidList;
-        }
-        if (list != null){
-            open(list, shell, partService);
-        }
+    protected void handleUuidList(Shell shell, EPartService partService, List<T> uuidList) throws Exception {
+        open(uuidList, shell, partService);
+    }
+
+    protected abstract void open(List<T> uuidList, Shell shell, EPartService partService);
 
+    @Override
+    protected void open(T entity, Shell shell, EPartService partService) throws Exception {
+        //nothing to do
+    }
+
+    @Override
+    public boolean canExecuteHandleList(List<T> uuidList) {
+        boolean canExecute = false;
+        for (T uuid : uuidList){
+            canExecute &= canExecute(uuid);
+        }
+        return canExecute;
     }
-}
+}
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenTaxonNodeWizardHandlerE4.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenTaxonNodeWizardHandlerE4.java
index 9b6ef91a0..919c5dba3 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenTaxonNodeWizardHandlerE4.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/defaultHandler/e4/DefaultOpenTaxonNodeWizardHandlerE4.java
@@ -14,13 +14,13 @@ import org.eclipse.e4.core.contexts.ContextInjectionFactory;
 import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.e4.ui.workbench.modeling.EPartService;
 import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.window.Window;
 import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.swt.widgets.Shell;
 
 import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
 import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
+import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
 import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
 import eu.etaxonomy.taxeditor.editor.ITaxonEditor;
 import eu.etaxonomy.taxeditor.event.EventUtility;
@@ -35,7 +35,7 @@ import eu.etaxonomy.taxeditor.ui.section.classification.EditTaxonNodeWizard;
  * @author k.luther
  * @date 22.03.2016
  */
-public class DefaultOpenTaxonNodeWizardHandlerE4 extends DefaultOpenHandlerBaseE4<TaxonNodeDto> {
+public class DefaultOpenTaxonNodeWizardHandlerE4 extends DefaultOpenHandlerBaseE4<ITaxonTreeNode, TaxonNodeDto> {
 
     @Override
     protected void open(TaxonNodeDto entity, Shell shell, EPartService partService) {
@@ -67,10 +67,7 @@ public class DefaultOpenTaxonNodeWizardHandlerE4 extends DefaultOpenHandlerBaseE
     }
 
     @Override
-    public boolean canExecute(Object selection) {
-        if (((IStructuredSelection)selection).getFirstElement() instanceof TaxonNodeDto && ((IStructuredSelection)selection).size() == 1){
-            return ((TaxonNodeDto)((IStructuredSelection)selection).getFirstElement()).getTaxonUuid()!=null && PreferencesUtil.getBooleanValue(PreferencePredicate.ShowTaxonNodeWizard.getKey());
-        }
-        return false;
+    public boolean canExecute(TaxonNodeDto selection) {
+        return selection.getTaxonUuid()!=null && PreferencesUtil.getBooleanValue(PreferencePredicate.ShowTaxonNodeWizard.getKey());
     }
 }
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerContextMenuE4.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerContextMenuE4.java
index 59eb9f603..c63827083 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerContextMenuE4.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerContextMenuE4.java
@@ -27,15 +27,10 @@ import org.eclipse.e4.ui.model.application.ui.menu.MMenu;
 import org.eclipse.e4.ui.model.application.ui.menu.MMenuElement;
 import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory;
 import org.eclipse.e4.ui.services.IServiceConstants;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeNode;
 
 import eu.etaxonomy.cdm.model.common.ICdmBase;
-import eu.etaxonomy.cdm.model.name.NomenclaturalSource;
-import eu.etaxonomy.cdm.persistence.dto.ReferencingObjectDto;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.l10n.Messages;
-import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
 
 /**
  * Generic context menu for opening elements in the taxeditor.
@@ -51,59 +46,29 @@ public class CdmViewerContextMenuE4 {
     @AboutToShow
     public void aboutToShow(List<MMenuElement> items, @Named(IServiceConstants.ACTIVE_SELECTION) Object selectedObject) {
 
-        Object firstElement = null;
-        if(selectedObject instanceof IStructuredSelection){
-            firstElement = ((IStructuredSelection) selectedObject).getFirstElement();
-        }else{
-            firstElement = selectedObject;
+        if (selectedObject == null){
+            return;
         }
 
-        if (firstElement instanceof FeatureNodeContainer){
-            return ;
-        }
-        if(firstElement instanceof TreeNode){
-            firstElement = ((TreeNode) firstElement).getValue();
-        }
+        List<UuidAndTitleCache<? extends ICdmBase>> uuidTypes = CdmViewerUtilE4.transformSelectionToUuidAndTitleCacheList(selectedObject);
 
-        if (firstElement instanceof NomenclaturalSource){
-            firstElement = ((NomenclaturalSource)firstElement).getSourcedName();
-        }
-        if (firstElement instanceof ReferencingObjectDto && ((ReferencingObjectDto)firstElement).getOpenInTarget() != null){
-            firstElement = ((ReferencingObjectDto)firstElement).getOpenInTarget();
-        }
-        Map<Command, String> enabledCommands = CdmViewerUtilE4.getAvailableViewers(firstElement, commandService, handlerService);
+        Map<Command, String> enabledCommands = CdmViewerUtilE4.getAvailableViewers(uuidTypes, commandService, handlerService);
 
         //check if only one or multiple viewers/commands are available
-        if(enabledCommands.size()==1){
-            Entry<Command, String> entry = enabledCommands.entrySet().iterator().next();
-            final Command command = entry.getKey();
-            String viewerName = entry.getValue();
-            MMenu menu = MMenuFactory.INSTANCE.createMenu();
-            menu.setLabel(Messages.CdmViewerContextMenu_OPEN_IN);
-            items.add(menu);
-           // items.add(addCommand(uuid, command, String.format(Messages.CdmViewerContextMenu_OPEN, viewerName)));
-            menu.getChildren().add(addCommand(selectedObject, command, viewerName));
-        }
-        else if(enabledCommands.size()>1){
+        if (!enabledCommands.isEmpty()){
             MMenu menu = MMenuFactory.INSTANCE.createMenu();
             menu.setLabel(Messages.CdmViewerContextMenu_OPEN_IN);
             items.add(menu);
-            for(Entry<Command, String> entry:enabledCommands.entrySet()){
+            for(Entry<Command, String> entry: enabledCommands.entrySet()){
                 String viewerName = entry.getValue();
                 Command command = entry.getKey();
-                if (selectedObject instanceof IStructuredSelection){
-                    menu.getChildren().add(addCommand(selectedObject, command, viewerName));
-                }else if(firstElement instanceof ICdmBase){
-//                    UUID uuid = ((ICdmBase) selectedObject).getUuid();
-                    menu.getChildren().add(addCommand(firstElement, command, viewerName));
-                }else if (firstElement instanceof UuidAndTitleCache){
-                   menu.getChildren().add(addCommand(firstElement, command, viewerName));
-                }
+                menu.getChildren().add(addCommand(uuidTypes, command, viewerName));
             }
         }
     }
 
-    public MHandledMenuItem addCommand(Object selection, Command command, String commandLabel) {
+
+    public MHandledMenuItem addCommand(List<UuidAndTitleCache<? extends ICdmBase>> selectedUuids, Command command, String commandLabel) {
         MHandledMenuItem menuItem = MMenuFactory.INSTANCE.createHandledMenuItem();
         menuItem.setLabel(commandLabel);
         MCommand mCommand = MCommandsFactory.INSTANCE.createCommand();
@@ -116,14 +81,13 @@ public class CdmViewerContextMenuE4 {
         }
         //set params
 
-          menuItem.getTransientData().put(command.getId()+".uuid", selection);
+          menuItem.getTransientData().put(command.getId()+".uuid", selectedUuids);
 
 //        MParameter parameter = MCommandsFactory.INSTANCE.createParameter();
 //        parameter.setElementId(command.getId()+".uuid");
 //        parameter.setValue(uuid.toString());
 //        menuItem.getParameters().add(parameter);
 
-
         menuItem.setCommand(mCommand);
         return menuItem;
     }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerUtil.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerUtil.java
index 77bb64f33..7cd928bc7 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerUtil.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerUtil.java
@@ -19,6 +19,7 @@ import org.eclipse.jface.viewers.TreeNode;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.commands.ICommandService;
 
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -41,12 +42,12 @@ public class CdmViewerUtil {
      *         representation
      */
     public static  Map<Command, String> getAvailableViewers(Object input){
-        Map<Command, String> commandViewerNameMap = new HashMap<Command, String>();
+                Map<Command, String> commandViewerNameMap = new HashMap<>();
 
         if(input!=null){
             //for generic UuidAndTitleCache objects try to load the object
             if (input instanceof UuidAndTitleCache){
-                UuidAndTitleCache uuidAndTitleCache = (UuidAndTitleCache)input;
+                UuidAndTitleCache<? extends CdmBase> uuidAndTitleCache = (UuidAndTitleCache<? extends CdmBase>)input;
                 input = CdmStore.getCommonService().find(uuidAndTitleCache.getType(), uuidAndTitleCache.getUuid());
             }
             //for tree nodes get the value resp. the object of the node
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerUtilE4.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerUtilE4.java
index 17d95b087..8e4d72b94 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerUtilE4.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerUtilE4.java
@@ -8,8 +8,12 @@
 */
 package eu.etaxonomy.taxeditor.view;
 
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import org.eclipse.core.commands.Command;
 import org.eclipse.core.runtime.IConfigurationElement;
@@ -17,10 +21,14 @@ import org.eclipse.core.runtime.IExtensionRegistry;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.e4.core.commands.ECommandService;
 import org.eclipse.e4.core.commands.EHandlerService;
+import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.TreeNode;
 
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.persistence.dto.ReferencingObjectDto;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
+import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 
 /**
@@ -39,55 +47,89 @@ public class CdmViewerUtilE4 {
      * @return a key-value map of available commands and their string
      *         representation
      */
-    public static Map<Command, String> getAvailableViewers(Object input, ECommandService commandService,
+    public static Map<Command, String> getAvailableViewers(List<UuidAndTitleCache<? extends ICdmBase>> input, ECommandService commandService,
             EHandlerService handlerService){
+
         Map<Command, String> commandViewerNameMap = new HashMap<>();
 
-        Class<?> inputClass = null;
+        Set<Class<?>> inputClasses = new HashSet<>();
         if(input!=null){
-            if (input instanceof ReferencingObjectDto){
-                ReferencingObjectDto dto = (ReferencingObjectDto)input;
-                inputClass = dto.getOpenInTarget() == null ? dto.getType() : dto.getOpenInTarget().getType();
-            }
-            //for generic UuidAndTitleCache objects try to load the object
-            else if (input instanceof UuidAndTitleCache){
-                UuidAndTitleCache<?> uuidAndTitleCache = (UuidAndTitleCache<?>)input;
-                inputClass = uuidAndTitleCache.getType();
-            }
-            //for tree nodes get the value resp. the object of the node
-            else if (input instanceof TreeNode){
-                TreeNode treeNode = (TreeNode)input;
-                inputClass = treeNode.getValue() == null? null: treeNode.getValue().getClass();
-            }
-            if (inputClass == null){
-                inputClass = input.getClass();
-            }
-        }
+            input.stream()
+                .filter(uuid->uuid.getType()!= null)
+                .forEach(uuid->inputClasses.add(uuid.getType()));
 
-        if(inputClass!=null){
-            IExtensionRegistry reg = Platform.getExtensionRegistry();
-            IConfigurationElement[] extensions = reg
-                    .getConfigurationElementsFor("eu.etaxonomy.taxeditor.store.cdmViewer"); //$NON-NLS-1$
-            for (IConfigurationElement configElement : extensions) {
-                try {
-                    if(configElement.getName().equals("viewCommandMapping")){ //$NON-NLS-1$
-                        String commandId = configElement.getAttribute("commandId"); //$NON-NLS-1$
-                        String viewerName = configElement.getAttribute("viewerName"); //$NON-NLS-1$
-                        Class<?> selectionClass = Class.forName(configElement.getAttribute("selection")); //$NON-NLS-1$
-                        if(selectionClass!=null
-                                && commandId!=null
-                                && viewerName!=null
-                                && selectionClass.isAssignableFrom(inputClass)){
-                            Command command = commandService.getCommand(commandId);
-                            commandViewerNameMap.put(command, viewerName);
+            inputClasses.forEach(ic->{
+                IExtensionRegistry reg = Platform.getExtensionRegistry();
+                IConfigurationElement[] extensions = reg
+                        .getConfigurationElementsFor("eu.etaxonomy.taxeditor.store.cdmViewer"); //$NON-NLS-1$
+                for (IConfigurationElement configElement : extensions) {
+                    try {
+                        if(configElement.getName().equals("viewCommandMapping")){ //$NON-NLS-1$
+                            String commandId = configElement.getAttribute("commandId"); //$NON-NLS-1$
+                            String viewerName = configElement.getAttribute("viewerName"); //$NON-NLS-1$
+                            Class<?> selectionClass = Class.forName(configElement.getAttribute("selection")); //$NON-NLS-1$
+                            if(selectionClass!=null
+                                    && commandId!=null
+                                    && viewerName!=null
+                                    && selectionClass.isAssignableFrom(ic)){
+                                Command command = commandService.getCommand(commandId);
+                                commandViewerNameMap.put(command, viewerName);
+                            }
                         }
+                    } catch (ClassNotFoundException e) {
+                        MessagingUtils.error(CdmViewerChooser.class, "Could not initalize selection class element of cdmViewer extension", e); //$NON-NLS-1$
                     }
-                } catch (ClassNotFoundException e) {
-                    MessagingUtils.error(CdmViewerChooser.class, "Could not initalize selection class element of cdmViewer extension", e); //$NON-NLS-1$
                 }
-            }
+            });
         }
+
         return commandViewerNameMap;
     }
 
-}
+
+    public static List<UuidAndTitleCache<? extends ICdmBase>> transformSelectionToUuidAndTitleCacheList(Object selectedObject) {
+
+        //make it all a list
+        List<Object> multipleSelection = new ArrayList<>();
+        if(selectedObject instanceof IStructuredSelection){
+            IStructuredSelection selection = ((IStructuredSelection) selectedObject);
+            ((List<?>)selection.toList()).forEach(o->multipleSelection.add(o));
+        }else if(selectedObject.getClass().isArray()){
+            for (Object o : ((Object[])selectedObject)){
+                multipleSelection.add(o);
+            }
+        }else if(selectedObject instanceof List){
+            multipleSelection.addAll((List<?>)selectedObject);
+        }else{
+            multipleSelection.add(selectedObject);
+        }
+
+        //filter all as uuidIdAndTitleCache
+        List<UuidAndTitleCache<? extends ICdmBase>> uuidTypes = new ArrayList<>();
+
+        for (Object o : multipleSelection){
+            if (o instanceof FeatureNodeContainer){
+                continue ;
+            }
+            if(o instanceof TreeNode){
+                o = ((TreeNode)o).getValue();
+            }
+            o = CdmBase.deproxy(o);
+
+            UuidAndTitleCache<? extends ICdmBase> uuidAndTitleCache;
+            if (o instanceof CdmBase){
+                CdmBase cdmBase = (CdmBase)o;
+                uuidAndTitleCache = new DtoWithEntity<>(cdmBase);
+            }else if (o instanceof ReferencingObjectDto){
+                ReferencingObjectDto dto = (ReferencingObjectDto)o;
+                uuidAndTitleCache = dto.getOpenInTarget() != null ? dto.getOpenInTarget() : dto;
+            }else if (o instanceof UuidAndTitleCache){
+                uuidAndTitleCache = (UuidAndTitleCache<CdmBase>)o;
+            }else{
+                continue;
+            }
+            uuidTypes.add(uuidAndTitleCache);
+        }
+        return uuidTypes;
+    }
+}
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/DtoWithEntity.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/DtoWithEntity.java
new file mode 100644
index 000000000..1c8ae264e
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/DtoWithEntity.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright (C) 2015 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
+package eu.etaxonomy.taxeditor.view;
+
+import eu.etaxonomy.cdm.model.common.ICdmBase;
+import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
+
+/**
+ * @author a.mueller
+ * @date 01.04.2021
+ */
+public class DtoWithEntity<S extends ICdmBase> extends UuidAndTitleCache<S> {
+
+    private static final long serialVersionUID = -7400373251065982668L;
+
+    private S entity;
+
+    public DtoWithEntity(S entity) {
+        super((Class<? extends S>)entity.getClass(), entity.getUuid(), entity.getId(), null);
+        this.setEntity(entity);
+    }
+
+    public S getEntity() {
+        return entity;
+    }
+    public void setEntity(S entity) {
+        this.entity = entity;
+    }
+}
