commit 03c03694faff2f08f385f9a98276a2cba2b91584
Author: Katja Luther <k.luther@bgbm.org>
Date:   Thu Sep 6 10:13:44 2018 +0200

    ref #3535: update both name editors after moving description oder description elements

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 776dbd508..1fadf38dc 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
@@ -66,6 +66,7 @@ import eu.etaxonomy.taxeditor.workbench.WorkbenchUtility;
  */
 public class MoveDescriptionElementsHandlerE4 implements IPostOperationEnabled{
     private UUID newAcceptedTaxonNodeUuid;
+    private UUID oldAcceptedTaxonNodeUuid;
     private TaxonNameEditorE4 editor;
     private MApplication application;
     private EModelService modelService;
@@ -133,7 +134,8 @@ public class MoveDescriptionElementsHandlerE4 implements IPostOperationEnabled{
         if (actualTaxon != null){
             if (!actualTaxon.getTaxonNodes().isEmpty() && actualTaxon.getTaxonNodes().size() ==1){
                 actualNode = actualTaxon.getTaxonNodes().iterator().next();
-                excludeTaxa.add(actualNode.getUuid());
+                oldAcceptedTaxonNodeUuid = actualNode.getUuid();
+                excludeTaxa.add(oldAcceptedTaxonNodeUuid);
                 classification = actualNode.getClassification();
 
             }
@@ -181,6 +183,7 @@ public class MoveDescriptionElementsHandlerE4 implements IPostOperationEnabled{
 //                        AbstractUtility.close(possibleOpenEditor);
 //                    }
                 EditorUtil.openTaxonNodeE4(newAcceptedTaxonNodeUuid, modelService, partService, application);
+                EditorUtil.openTaxonNodeE4(oldAcceptedTaxonNodeUuid, modelService, partService, application);
             }
 
         });
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 ee9aca611..091b7ae17 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
@@ -57,6 +57,9 @@ public class MoveDescriptionToOtherTaxonHandlerE4 implements IPostOperationEnabl
     private MoveDescriptionToOtherTaxonOperation operation;
 
     private UUID newAcceptedTaxonNodeUuid;
+    private UUID oldAcceptedTaxonNodeUuid;
+    private UUID newAcceptedTaxonUuid;
+    private UUID oldAcceptedTaxonUuid;
     private TaxonNameEditorE4 editor;
     private MApplication application;
     private EModelService modelService;
@@ -100,17 +103,20 @@ public class MoveDescriptionToOtherTaxonHandlerE4 implements IPostOperationEnabl
         descriptions.add(description);
 
         // Choose the target taxon
-        Set<UUID> excludeTaxa = new HashSet<>();
 
-        excludeTaxa.add(descriptions.get(0).getTaxon().getUuid());
 
         //get current taxon node
         TaxonNode node = null;
         Classification classification = null;
         if(editor!=null){
             node = editor.getEditorInput().getTaxonNode();
+            oldAcceptedTaxonUuid = editor.getTaxon().getUuid();
+            oldAcceptedTaxonNodeUuid = node.getUuid();
             classification = node.getClassification();
         }
+
+        Set<UUID> excludeTaxa = new HashSet<>();
+        excludeTaxa.add(oldAcceptedTaxonNodeUuid);
         TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(shell,
 //                editor.getConversationHolder(),
                 Messages.MoveDescriptionToOtherTaxonHandler_CHOOSE_ACC_TAXON,
@@ -123,7 +129,7 @@ public class MoveDescriptionToOtherTaxonHandlerE4 implements IPostOperationEnabl
         }
 
         newAcceptedTaxonNodeUuid = newAcceptedTaxonNode.getUuid();
-
+        newAcceptedTaxonUuid = newAcceptedTaxonNode.getTaxon().getUuid();
         for(TaxonDescription taxonDescription : descriptions){
             operation = new MoveDescriptionToOtherTaxonOperation(menuItem.getLocalizedLabel(),
                     editor.getUndoContext(),
@@ -153,7 +159,10 @@ public class MoveDescriptionToOtherTaxonHandlerE4 implements IPostOperationEnabl
 //                    if(possibleOpenEditor != null){
 //                        AbstractUtility.close(possibleOpenEditor);
 //                    }
+//                    EventUtility.postEvent(WorkbenchEventConstants.REFRESH_NAME_EDITOR, oldAcceptedTaxonNodeUuid);
+//                    EventUtility.postEvent(WorkbenchEventConstants.REFRESH_NAME_EDITOR, newAcceptedTaxonNodeUuid);
                     EditorUtil.openTaxonNodeE4(newAcceptedTaxonNodeUuid, modelService, partService, application);
+                    EditorUtil.openTaxonNodeE4(oldAcceptedTaxonNodeUuid, 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/RemotingMoveTaxonNodeHandlerE4.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/RemotingMoveTaxonNodeHandlerE4.java
index b65a703a7..675cf8fec 100644
--- a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/RemotingMoveTaxonNodeHandlerE4.java
+++ b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/RemotingMoveTaxonNodeHandlerE4.java
@@ -66,6 +66,7 @@ public class RemotingMoveTaxonNodeHandlerE4 extends RemotingCdmHandlerE4 {
                     TaxonNavigatorLabels.NO_TAXON_SELECTION_MESSAGE);
         }
         // check that selected object is a taxon node
+
         Object obj ;
         Iterator iter = selection.iterator();
         oldTaxonNodeUUIDs = new HashSet<>();
