commit 41c668f3ea645fb43aedc6ae90a25c8f62077d20
Author: Patrick Plitzner <p.plitzner@bgbm.org>
Date:   Fri Oct 27 12:20:19 2017 +0200

    ref #6595 code refactoring

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 1dae7d6d6..ea5224ca5 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
@@ -10,13 +10,16 @@
 package eu.etaxonomy.taxeditor.editor;
 
 import java.util.Collection;
+import java.util.List;
 import java.util.UUID;
 
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.operations.IOperationHistory;
 import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.e4.ui.model.application.ui.advanced.MArea;
 import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainerElement;
 import org.eclipse.e4.ui.model.application.ui.basic.MPartStack;
 import org.eclipse.e4.ui.workbench.modeling.EModelService;
 import org.eclipse.e4.ui.workbench.modeling.EPartService;
@@ -27,6 +30,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.TreeNode;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
@@ -69,23 +73,6 @@ public class EditorUtil extends AbstractUtility {
 //	    }
 //	}
 
-	/**
-	 * Taxon Editors may be opened by supplying a taxon node uuid. Session gets
-	 * initialised here and is passed to the editor
-	 *
-	 * @param taxonNodeUuid
-	 *            a {@link java.util.UUID} object.
-	 * @throws java.lang.Exception
-	 *             if any.
-	 */
-	public static void openTaxonNodeE4(UUID taxonNodeUuid) throws Exception {
-	    //FIXME E4 this can probably be removed when fully migrated
-        TaxonEditorInputE4 input = TaxonEditorInputE4.NewInstance(taxonNodeUuid);
-
-        EPartService partService = TaxeditorEditorPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getService(EPartService.class);
-        EModelService modelService = TaxeditorEditorPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getService(EModelService.class);
-        openNameEditor_internal(input, modelService, partService, null);
-	}
 	public static void openTaxonNodeE4(UUID taxonNodeUuid, EModelService modelService, EPartService partService, MApplication application) throws Exception {
 	    TaxonEditorInputE4 input = TaxonEditorInputE4.NewInstance(taxonNodeUuid);
 	    openNameEditor_internal(input, modelService, partService, application);
@@ -134,10 +121,10 @@ public class EditorUtil extends AbstractUtility {
         }
         if(part==null){
             part = partService.createPart(NAME_EDITOR_ID);
-            if(application!=null){
-                //FIXME E4 hack for opening in e3 editor area
-                MPartStack partStack = (MPartStack)modelService.find("org.eclipse.e4.primaryDataStack", application);
-                partStack.getChildren().add(part);
+
+            MPartStack editorAreaPartStack = getEditorAreaPartStack(application, modelService);
+            if(editorAreaPartStack!=null){
+                editorAreaPartStack.getChildren().add(part);
             }
             partService.showPart(part, PartState.ACTIVATE);
 
@@ -149,6 +136,23 @@ public class EditorUtil extends AbstractUtility {
         }
     }
 
+    public static MPartStack getEditorAreaPartStack(MApplication application, EModelService modelService){
+        //FIXME E4 hack for opening in e3 editor area
+        if(application!=null){
+            //FIXME E4 hack for opening in e3 editor area
+            List<MArea> elements = modelService.findElements(application, "org.eclipse.ui.editorss", MArea.class, null);
+            for (MArea mArea : elements) {
+                List<MPartSashContainerElement> children = mArea.getChildren();
+                for (MPartSashContainerElement mPartSashContainerElement : children) {
+                    if(mPartSashContainerElement instanceof MPartStack){
+                        return (MPartStack) mPartSashContainerElement;
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
 	/**
 	 * An uninitialized taxon is one that hasn't been saved yet. As such, it
 	 * should appear in neither the list of recent names nor in the taxonomic
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 cb0da84a8..20abde6ea 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
@@ -20,7 +20,7 @@ public class DefaultOpenTaxonEditorForTaxonBaseHandler extends DefaultOpenHandle
 
     @Override
     protected void open(TaxonBase entity, Shell shell, EPartService partService) {
-        EditorUtil.openTaxonBaseE4(entity.getUuid());
+        EditorUtil.openTaxonBaseE4(entity.getUuid(), modelService, partService, application);
     }
 
     /**
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 4c8e982b9..2d1011f05 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
@@ -23,7 +23,7 @@ public class DefaultOpenTaxonEditorForTaxonNodeHandler extends DefaultOpenHandle
     @Override
     protected void open(TaxonNode entity, Shell shell, EPartService partService) {
         try {
-            EditorUtil.openTaxonNodeE4(entity.getUuid());
+            EditorUtil.openTaxonNodeE4(entity.getUuid(), modelService, partService, application);
         } catch (Exception e) {
             MessagingUtils.error(DefaultOpenTaxonEditorForTaxonNodeHandler.class, Messages.DefaultOpenTaxonEditorForTaxonNodeHandler_COULD_NOT_OPEN+entity.getTaxon(), e);
         }
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/e4/PolytomousKeyListEditorE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/e4/PolytomousKeyListEditorE4.java
index cb2074a35..ff51281c9 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/e4/PolytomousKeyListEditorE4.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/e4/PolytomousKeyListEditorE4.java
@@ -17,9 +17,12 @@ import javax.inject.Inject;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.e4.ui.di.Focus;
 import org.eclipse.e4.ui.di.Persist;
+import org.eclipse.e4.ui.model.application.MApplication;
 import org.eclipse.e4.ui.model.application.ui.MDirtyable;
 import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.e4.ui.services.EMenuService;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+import org.eclipse.e4.ui.workbench.modeling.EPartService;
 import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.StructuredSelection;
@@ -53,6 +56,7 @@ import eu.etaxonomy.taxeditor.editor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.DataChangeBridge;
 import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
 import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
+import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
 import eu.etaxonomy.taxeditor.workbench.part.IE4SavablePart;
 
 /**
@@ -98,7 +102,7 @@ public class PolytomousKeyListEditorE4 implements
 		        if (selectedColumn == 5) {
 		            Taxon taxon = getItemTaxon(node);
 		            if (taxon != null) {
-		                EditorUtil.openTaxonBaseE4((taxon).getUuid());
+		                EditorUtil.openTaxonBaseE4((taxon).getUuid(), modelService, partService, application);
 		            }
 		        }
 		    }
@@ -146,6 +150,15 @@ public class PolytomousKeyListEditorE4 implements
     @Inject
     private MDirtyable dirty;
 
+    @Inject
+    private MApplication application;
+
+    @Inject
+    private EModelService modelService;
+
+    @Inject
+    private EPartService partService;
+
     private ISelectionChangedListener selectionChangedListener;
 
     @Inject
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/ChangeSynonymToAcceptedTaxonHandlerE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/ChangeSynonymToAcceptedTaxonHandlerE4.java
index 5bc3123f0..3442da901 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/ChangeSynonymToAcceptedTaxonHandlerE4.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/ChangeSynonymToAcceptedTaxonHandlerE4.java
@@ -17,9 +17,12 @@ import org.apache.log4j.Logger;
 import org.eclipse.e4.core.di.annotations.CanExecute;
 import org.eclipse.e4.core.di.annotations.Execute;
 import org.eclipse.e4.ui.di.UISynchronize;
+import org.eclipse.e4.ui.model.application.MApplication;
 import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 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 org.eclipse.ui.PartInitException;
@@ -52,13 +55,20 @@ public class ChangeSynonymToAcceptedTaxonHandlerE4 implements IPostOperationEnab
 			.getLogger(ChangeSynonymToAcceptedTaxonHandlerE4.class);
 
 	private TaxonNameEditorE4 editor;
+    private EPartService partService;
+    private MApplication application;
+    private EModelService modelService;
 
     @Execute
-    public void execute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart,
-            @Named(IServiceConstants.ACTIVE_SELECTION)IStructuredSelection selection,
-            @Named(IServiceConstants.ACTIVE_SHELL)Shell shell,
+    public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart,
+            @Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection, EPartService partService,
+            EModelService modelService, MApplication application, @Named(IServiceConstants.ACTIVE_SHELL) Shell shell,
             UISynchronize sync) {
 
+        this.modelService = modelService;
+        this.application = application;
+        this.partService = partService;
+
         editor = (TaxonNameEditorE4) activePart.getObject();
 
         TaxonEditorInputE4 input = editor.getEditorInput();
@@ -112,7 +122,7 @@ public class ChangeSynonymToAcceptedTaxonHandlerE4 implements IPostOperationEnab
 			TaxonNode newNode = (TaxonNode) objectAffectedByOperation;
 
 			try {
-				EditorUtil.openTaxonNodeE4(newNode.getUuid());
+				EditorUtil.openTaxonNodeE4(newNode.getUuid(), modelService, partService, application);
 			} catch (PartInitException e) {
 				e.printStackTrace();
 			} catch (Exception e) {
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/SwapSynonymAndAcceptedHandlerE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/SwapSynonymAndAcceptedHandlerE4.java
index cc3b0d7cd..4d756e1c2 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/SwapSynonymAndAcceptedHandlerE4.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/SwapSynonymAndAcceptedHandlerE4.java
@@ -14,9 +14,11 @@ import javax.inject.Named;
 import org.eclipse.e4.core.di.annotations.CanExecute;
 import org.eclipse.e4.core.di.annotations.Execute;
 import org.eclipse.e4.ui.di.UISynchronize;
+import org.eclipse.e4.ui.model.application.MApplication;
 import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 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.Display;
@@ -46,14 +48,19 @@ public class SwapSynonymAndAcceptedHandlerE4 implements IPostOperationEnabled {
     private Taxon taxon;
     private EPartService partService;
     private MPart activePart;
+    private MApplication application;
+    private EModelService modelService;
 
     @Execute
     public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart,
             @Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection,
             @Named(IServiceConstants.ACTIVE_SHELL) Shell shell, MHandledMenuItem menuItem, EPartService partService,
+            EModelService modelService, MApplication application,
             UISynchronize sync) {
 
         this.activePart = activePart;
+        this.modelService = modelService;
+        this.application = application;
         this.partService = partService;
 
         editor = (TaxonNameEditorE4) activePart.getObject();
@@ -104,7 +111,7 @@ public class SwapSynonymAndAcceptedHandlerE4 implements IPostOperationEnabled {
             @Override
             public void run() {
                 try {
-                    EditorUtil.openTaxonBaseE4(taxon.getUuid());
+                    EditorUtil.openTaxonBaseE4(taxon.getUuid(), modelService, partService, application);
                 } catch (Exception e) {
                     MessagingUtils.warningDialog(Messages.SwapSynonymAndAcceptedHandler_COULD_NOT_OPEN, this,
                             e.getMessage());
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/OpenRelatedConceptHandlerE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/OpenRelatedConceptHandlerE4.java
index d910e9363..80f2a5a60 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/OpenRelatedConceptHandlerE4.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/OpenRelatedConceptHandlerE4.java
@@ -13,8 +13,11 @@ import javax.inject.Named;
 
 import org.eclipse.e4.core.di.annotations.Execute;
 import org.eclipse.e4.core.di.annotations.Optional;
+import org.eclipse.e4.ui.model.application.MApplication;
 import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 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.ISelection;
 
 import eu.etaxonomy.cdm.model.taxon.Taxon;
@@ -39,7 +42,7 @@ public class OpenRelatedConceptHandlerE4  {
 
     @Execute
     public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart,
-            @Optional@Named(IServiceConstants.ACTIVE_SELECTION) TaxonRelationship taxonRelationship) {
+            @Optional@Named(IServiceConstants.ACTIVE_SELECTION) TaxonRelationship taxonRelationship, EModelService modelService, EPartService partService, MApplication application) {
 
         TaxonNameEditorE4 editor = null;
         BulkEditor bulkEditor = null;
@@ -72,15 +75,12 @@ public class OpenRelatedConceptHandlerE4  {
 		            String.format(Messages.OpenRelatedConceptHandler_COULD_NOT_OPEN_MESSAGE ,relatedTaxon), null);
 		}
 		else{
-		    openConcept(relatedTaxon);
+		    openConcept(relatedTaxon, modelService, partService, application);
 		}
 	}
 
-    /**
-     * @param relatedTaxon
-     */
-    protected void openConcept(TaxonBase<?> relatedTaxon) {
-        EditorUtil.openTaxonBaseE4(relatedTaxon.getUuid());
+    protected void openConcept(TaxonBase<?> relatedTaxon, EModelService modelService, EPartService partService, MApplication application) {
+        EditorUtil.openTaxonBaseE4(relatedTaxon.getUuid(), modelService, partService, application);
     }
 
 	private Taxon getRelatedTaxon(TaxonRelationship relationship, Taxon taxon){
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/OpenRelatedConceptInBulkEditorHandlerE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/OpenRelatedConceptInBulkEditorHandlerE4.java
index d1763342f..93389548e 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/OpenRelatedConceptInBulkEditorHandlerE4.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/OpenRelatedConceptInBulkEditorHandlerE4.java
@@ -1,5 +1,9 @@
 package eu.etaxonomy.taxeditor.editor.view.concept.e4.handler;
 
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+import org.eclipse.e4.ui.workbench.modeling.EPartService;
+
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 
@@ -8,7 +12,7 @@ public class OpenRelatedConceptInBulkEditorHandlerE4 extends OpenRelatedConceptH
      * {@inheritDoc}
      */
     @Override
-    protected void openConcept(TaxonBase<?> relatedTaxon) {
-        EditorUtil.openTaxonBaseE4(relatedTaxon.getUuid());
+    protected void openConcept(TaxonBase<?> relatedTaxon, EModelService modelService, EPartService partService, MApplication application) {
+        EditorUtil.openTaxonBaseE4(relatedTaxon.getUuid(), modelService, partService, application);
     }
 }
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/handler/MoveDescriptionElementsHandlerE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/handler/MoveDescriptionElementsHandlerE4.java
index 62c71589e..b9202ccca 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/handler/MoveDescriptionElementsHandlerE4.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/handler/MoveDescriptionElementsHandlerE4.java
@@ -19,10 +19,13 @@ import org.eclipse.e4.core.di.annotations.CanExecute;
 import org.eclipse.e4.core.di.annotations.Execute;
 import org.eclipse.e4.core.di.annotations.Optional;
 import org.eclipse.e4.ui.di.UISynchronize;
+import org.eclipse.e4.ui.model.application.MApplication;
 import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
 import org.eclipse.e4.ui.model.application.ui.menu.MMenuItem;
 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.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.swt.widgets.Display;
@@ -62,12 +65,19 @@ import eu.etaxonomy.taxeditor.workbench.WorkbenchUtility;
 public class MoveDescriptionElementsHandlerE4 implements IPostOperationEnabled{
     private UUID newAcceptedTaxonNodeUuid;
     private TaxonNameEditorE4 editor;
+    private MApplication application;
+    private EModelService modelService;
+    private EPartService partService;
 
     @Execute
     public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart,
-            @Optional@Named(IServiceConstants.ACTIVE_SELECTION) Object selection,
-            @Named(IServiceConstants.ACTIVE_SHELL)Shell shell, MMenuItem menuItem,
-            UISynchronize sync) {
+            @Optional @Named(IServiceConstants.ACTIVE_SELECTION) Object selection,
+            @Named(IServiceConstants.ACTIVE_SHELL) Shell shell, MMenuItem menuItem, EPartService partService,
+            EModelService modelService, MApplication application, UISynchronize sync) {
+
+        this.modelService = modelService;
+        this.application = application;
+        this.partService = partService;
 
         FactualDataPartE4 factualDataPart = (FactualDataPartE4) activePart.getObject();
         Object e4WrappedPart = WorkbenchUtility.getE4WrappedPart(factualDataPart.getSelectionProvidingPart());
@@ -155,7 +165,7 @@ public class MoveDescriptionElementsHandlerE4 implements IPostOperationEnabled{
 //                    if(possibleOpenEditor != null){
 //                        AbstractUtility.close(possibleOpenEditor);
 //                    }
-                    EditorUtil.openTaxonNodeE4(newAcceptedTaxonNodeUuid);
+                    EditorUtil.openTaxonNodeE4(newAcceptedTaxonNodeUuid, modelService, partService, application);
                 } catch (PartInitException e) {
                     MessagingUtils.error(this.getClass(), e);
                     throw new RuntimeException(e);
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/handler/MoveDescriptionToOtherTaxonHandlerE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/handler/MoveDescriptionToOtherTaxonHandlerE4.java
index 4a5e4bcb6..a8f1ae0bf 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/handler/MoveDescriptionToOtherTaxonHandlerE4.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/handler/MoveDescriptionToOtherTaxonHandlerE4.java
@@ -13,10 +13,13 @@ import org.eclipse.e4.core.di.annotations.CanExecute;
 import org.eclipse.e4.core.di.annotations.Execute;
 import org.eclipse.e4.core.di.annotations.Optional;
 import org.eclipse.e4.ui.di.UISynchronize;
+import org.eclipse.e4.ui.model.application.MApplication;
 import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
 import org.eclipse.e4.ui.model.application.ui.menu.MMenuItem;
 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.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -53,13 +56,19 @@ public class MoveDescriptionToOtherTaxonHandlerE4 implements IPostOperationEnabl
 
     private UUID newAcceptedTaxonNodeUuid;
     private TaxonNameEditorE4 editor;
+    private MApplication application;
+    private EModelService modelService;
+    private EPartService partService;
 
     @Execute
     public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart,
-            @Optional@Named(IServiceConstants.ACTIVE_SELECTION) Object selection,
-            @Named(IServiceConstants.ACTIVE_SHELL)Shell shell, MMenuItem menuItem,
-            UISynchronize sync) {
+            @Optional @Named(IServiceConstants.ACTIVE_SELECTION) Object selection,
+            @Named(IServiceConstants.ACTIVE_SHELL) Shell shell, MMenuItem menuItem, EPartService partService,
+            EModelService modelService, MApplication application, UISynchronize sync) {
 
+        this.modelService = modelService;
+        this.application = application;
+        this.partService = partService;
 
         FactualDataPartE4 factualDataPart = (FactualDataPartE4) activePart.getObject();
         Object e4WrappedPart = WorkbenchUtility.getE4WrappedPart(factualDataPart.getSelectionProvidingPart());
@@ -141,7 +150,7 @@ public class MoveDescriptionToOtherTaxonHandlerE4 implements IPostOperationEnabl
 //                    if(possibleOpenEditor != null){
 //                        AbstractUtility.close(possibleOpenEditor);
 //                    }
-                    EditorUtil.openTaxonNodeE4(newAcceptedTaxonNodeUuid);
+                    EditorUtil.openTaxonNodeE4(newAcceptedTaxonNodeUuid, modelService, partService, application);
 //                } catch (PartInitException e) {
 //                    MessagingUtils.error(this.getClass(), e);
 //                    throw new RuntimeException(e);
diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/NewTaxonNodeHandlerE4.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/NewTaxonNodeHandlerE4.java
index d1fa6c844..4f6333be9 100644
--- a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/NewTaxonNodeHandlerE4.java
+++ b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/NewTaxonNodeHandlerE4.java
@@ -14,7 +14,10 @@ import javax.inject.Named;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.e4.core.di.annotations.CanExecute;
 import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.model.application.MApplication;
 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.ITreeSelection;
 import org.eclipse.jface.viewers.TreeSelection;
 import org.eclipse.jface.wizard.WizardDialog;
@@ -33,8 +36,9 @@ import eu.etaxonomy.taxeditor.newWizard.NewTaxonNodeWizard;
 public class NewTaxonNodeHandlerE4 {
 
     @Execute
-    public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell,
-            @Named(IServiceConstants.ACTIVE_SELECTION)ITreeSelection selection) throws Exception {
+    public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell,
+            @Named(IServiceConstants.ACTIVE_SELECTION) ITreeSelection selection, EModelService modelService,
+            EPartService partService, MApplication application) throws Exception {
 
 		final NewTaxonNodeWizard wizard = new NewTaxonNodeWizard();
 		wizard.init(null, selection);
@@ -52,7 +56,7 @@ public class NewTaxonNodeHandlerE4 {
 			if(wizard.openEmpty()){
                 EditorUtil.openEmptyE4(wizard.getParentTreeNode().getUuid());
 			}else if(wizard.getTaxonNode() != null){
-                EditorUtil.openTaxonNodeE4(wizard.getTaxonNode().getUuid());
+                EditorUtil.openTaxonNodeE4(wizard.getTaxonNode().getUuid(), modelService, partService, application);
 			}
 		}
 	}
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 bbe89b90b..494ac23c3 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
@@ -7,8 +7,10 @@ import javax.inject.Named;
 import org.eclipse.e4.core.contexts.IEclipseContext;
 import org.eclipse.e4.core.di.annotations.CanExecute;
 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.swt.widgets.Shell;
 
@@ -16,10 +18,17 @@ public abstract class DefaultOpenHandlerBaseE4 <T> {
 
     protected IEclipseContext context;
 
+    protected MApplication application;
+
+    protected EModelService modelService;
+
     @Execute
-    public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell, MHandledMenuItem menuItem, EPartService partService,
+    public void execute(@Named(IServiceConstants.ACTIVE_SHELL)Shell shell, MHandledMenuItem menuItem,
+            EModelService modelService, EPartService partService, MApplication application,
             IEclipseContext context) {
         this.context = context;
+        this.modelService = modelService;
+        this.application = application;
 
         String commandId = menuItem.getCommand().getElementId();
         Object transientData = menuItem.getTransientData().get(commandId+".uuid");
