Pre-select classification for remote moving operations
authorPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 29 Oct 2015 12:40:31 +0000 (13:40 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 29 Oct 2015 12:40:31 +0000 (13:40 +0100)
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingMoveFactualDataHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingMoveTaxonNodeHandler.java

index f0fa3d9216b6a79f22588f711f2aa27d7317c7e6..1d6b008e903e98bcc367872528fc5b4aa84df2f1 100644 (file)
@@ -96,7 +96,7 @@ public class RemotingMoveFactualDataHandler extends RemotingCdmHandler {
                 "Choose the accepted taxon",
                 excludeTaxa,
                 null,
-                null);
+                sourceTaxonNode.getClassification());
 
         if(targetTaxonNode == null) {
             return new Status(IStatus.CANCEL,
index 9152461c3b74b661ece95c4b933cc9092b9c4005..3458faa9f8df8c1cccc9a94dfc6c92e0900dc076 100644 (file)
@@ -85,12 +85,12 @@ public class RemotingMoveTaxonNodeHandler extends RemotingCdmHandler {
         TaxonNode parentTaxonNode;
 
         List<UUID> excludeTaxa = new ArrayList<UUID>();
-        excludeTaxa.add(((TaxonNode)oldTaxonNode).getTaxon().getUuid());
+        excludeTaxa.add(oldTaxonNode.getTaxon().getUuid());
 
         boolean moveToNewParent = true;
 
         if (PreferencesUtil.getSortNodesNaturally()){
-            if(!MessageDialog.openQuestion(activeShell, "Target node", "The choosen target node should be the parent?")){
+            if(!MessageDialog.openQuestion(activeShell, "Target node", "Should the choosen target node be the parent of this taxon node?")){
                 moveToNewParent = false;
             }
             parentTaxonNode = TaxonNodeSelectionDialog.select(activeShell,
@@ -98,14 +98,14 @@ public class RemotingMoveTaxonNodeHandler extends RemotingCdmHandler {
                     "Choose the taxon above the moved taxon.",
                     excludeTaxa,
                     null,
-                    null);
+                    oldTaxonNode.getClassification());
         } else {
             parentTaxonNode = TaxonNodeSelectionDialog.select(activeShell,
                     new ConversationHolderMock(),
                     "Choose new parent",
                     excludeTaxa,
                     null,
-                    null);
+                    oldTaxonNode.getClassification());
         }