commit 806bd3b034376c5979bc766a829886e0f156f538
Author: Patrick Plitzner <p.plitzner@bgbm.org>
Date:   Fri Aug 17 10:43:37 2018 +0200

    ref #7362 Use pre-selected vocabulary when dragging terms

diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureNodeDropAdapter.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureNodeDropAdapter.java
index 1b98cd59c..739171955 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureNodeDropAdapter.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureNodeDropAdapter.java
@@ -105,13 +105,16 @@ public class FeatureNodeDropAdapter extends ViewerDropAdapter {
 		    }
 		    else if(droppedObject instanceof OntologyTermWrapper){
 		        OntologyTermWrapper wrapper = (OntologyTermWrapper)droppedObject;
-		        TermVocabulary vocabulary = TermVocabularySelectionDialog.select(
-		                "Choose vocabulary for import", viewer.getControl().getShell(), null);
-		        if(vocabulary instanceof OrderedTermVocabulary){
-		            MessagingUtils.warningDialog("Import not possible", this,
-		                    "The chosen vocabulary is an ordered vocabulary.\n"
-		                    + "Importing into ordered vocabularies is currently not supported.");
-		            return false;
+		        TermVocabulary vocabulary = wrapper.getTermVocabulary();
+		        if(vocabulary==null){
+		            vocabulary =  TermVocabularySelectionDialog.select(
+		                    "Choose vocabulary for import", viewer.getControl().getShell(), null);
+		            if(vocabulary instanceof OrderedTermVocabulary){
+		                MessagingUtils.warningDialog("Import not possible", this,
+		                        "The chosen vocabulary is an ordered vocabulary.\n"
+		                                + "Importing into ordered vocabularies is currently not supported.");
+		                return false;
+		            }
 		        }
 		        if(vocabulary!=null){
 		            if(wrapper.getDescription()==null && MessagingUtils.confirmDialog("Load Details?", "Not all details for this term have been loaded yet.\n"
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/GfBioTerminologyImportPresenter.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/GfBioTerminologyImportPresenter.java
index 17012215f..04e3a3635 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/GfBioTerminologyImportPresenter.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/GfBioTerminologyImportPresenter.java
@@ -150,7 +150,11 @@ public class GfBioTerminologyImportPresenter {
             @Override
             public void dragSetData(DragSourceEvent event) {
                 if (LocalSelectionTransfer.getTransfer().isSupportedType(event.dataType)) {
-                    LocalSelectionTransfer.getTransfer().setSelection(composite.getTreeTermHierarchy().getSelection());
+                    IStructuredSelection selection = (IStructuredSelection) composite.getTreeTermHierarchy().getSelection();
+                    selection.toList().stream()
+                    .filter(item->item instanceof OntologyTermWrapper)
+                    .forEach(wrapper->((OntologyTermWrapper)wrapper).setTermVocabulary(composite.getTermVocabularyComboViewer().getSelection()));
+                    LocalSelectionTransfer.getTransfer().setSelection(selection);
                 }
             }
             @Override
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/wrapper/OntologyTermWrapper.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/wrapper/OntologyTermWrapper.java
index eb8453da8..a5e211e58 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/wrapper/OntologyTermWrapper.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/wrapper/OntologyTermWrapper.java
@@ -10,6 +10,8 @@ package eu.etaxonomy.taxeditor.view.webimport.termimport.wrapper;
 
 import java.util.List;
 
+import eu.etaxonomy.cdm.model.common.TermVocabulary;
+
 /**
  * Wrapper for terms received from the GfBio terminology service.
  *
@@ -23,6 +25,7 @@ public class OntologyTermWrapper extends TermWrapper{
     private String description;
     private List<String> synonyms;
     private String comment;
+    private TermVocabulary termVocabulary;
     public OntologyTermWrapper(String uri, String label, String sourceTerminology) {
         super(uri, label);
         this.sourceTerminology = sourceTerminology;
@@ -51,4 +54,10 @@ public class OntologyTermWrapper extends TermWrapper{
     public void setSourceTerminology(String sourceTerminology) {
         this.sourceTerminology = sourceTerminology;
     }
+    public TermVocabulary getTermVocabulary() {
+        return termVocabulary;
+    }
+    public void setTermVocabulary(TermVocabulary termVocabulary) {
+        this.termVocabulary = termVocabulary;
+    }
 }
