commit aeb34234f2537435482d65d6696a96aeaea4c112
Author: Patrick Plitzner <p.plitzner@bgbm.org>
Date:   Fri Aug 17 10:26:39 2018 +0200

    ref #7362 Add term vocabular combo

diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/termvocabulary/TermVocabularyComboContentProvider.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/termvocabulary/TermVocabularyComboContentProvider.java
new file mode 100644
index 000000000..bf981acd9
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/termvocabulary/TermVocabularyComboContentProvider.java
@@ -0,0 +1,31 @@
+/**
+* Copyright (C) 2017 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.ui.combo.termvocabulary;
+
+import java.util.Collection;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+
+/**
+ *
+ * @author pplitzner
+ * @since Aug 17, 2018
+ *
+ */
+public class TermVocabularyComboContentProvider implements IStructuredContentProvider {
+
+    @Override
+    public Object[] getElements(Object inputElement) {
+        if(inputElement instanceof Collection){
+            return ((Collection) inputElement).toArray();
+        }
+    	return null;
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/termvocabulary/TermVocabularyComboLabelProvider.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/termvocabulary/TermVocabularyComboLabelProvider.java
new file mode 100644
index 000000000..c26d1a020
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/termvocabulary/TermVocabularyComboLabelProvider.java
@@ -0,0 +1,31 @@
+/**
+* Copyright (C) 2017 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.ui.combo.termvocabulary;
+
+import org.eclipse.jface.viewers.LabelProvider;
+
+import eu.etaxonomy.cdm.model.common.TermVocabulary;
+
+/**
+ *
+ * @author pplitzner
+ * @since Aug 17, 2018
+ *
+ */
+public class TermVocabularyComboLabelProvider extends LabelProvider {
+
+    @Override
+    public String getText(Object element) {
+        if(element instanceof TermVocabulary){
+            return ((TermVocabulary) element).getLabel();
+        }
+        return super.getText(element);
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/termvocabulary/TermVocabularyComboViewer.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/termvocabulary/TermVocabularyComboViewer.java
new file mode 100644
index 000000000..f0e66efeb
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/termvocabulary/TermVocabularyComboViewer.java
@@ -0,0 +1,45 @@
+/**
+* Copyright (C) 2017 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.ui.combo.termvocabulary;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.swt.widgets.Composite;
+
+import eu.etaxonomy.cdm.model.common.TermVocabulary;
+import eu.etaxonomy.taxeditor.ui.combo.AbstractComboComposite;
+
+/**
+ *
+ * @author pplitzner
+ * @since Aug 17, 2018
+ *
+ */
+public class TermVocabularyComboViewer extends AbstractComboComposite<TermVocabulary>{
+
+    public TermVocabularyComboViewer(Composite parent, int style) {
+        super(parent, style);
+    }
+
+    @Override
+    public String getElementLabel(TermVocabulary element) {
+        return element!=null?element.getLabel():"";
+    }
+
+    @Override
+    public IStructuredContentProvider getContentProvider() {
+        return new TermVocabularyComboContentProvider();
+    }
+
+    @Override
+    public ILabelProvider getLabelProvider() {
+        return new TermVocabularyComboLabelProvider();
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/GfBioTerminologyImportComposite.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/GfBioTerminologyImportComposite.java
index fef1681a0..442df5642 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/GfBioTerminologyImportComposite.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/webimport/termimport/GfBioTerminologyImportComposite.java
@@ -17,10 +17,15 @@ import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.List;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.swt.widgets.Tree;
 
+import eu.etaxonomy.cdm.api.service.IVocabularyService;
+import eu.etaxonomy.cdm.model.common.TermVocabulary;
 import eu.etaxonomy.taxeditor.model.ImageResources;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.ui.combo.termvocabulary.TermVocabularyComboViewer;
 
 /**
  * @author pplitzner
@@ -43,6 +48,13 @@ public class GfBioTerminologyImportComposite extends Composite{
     private Text txtUri;
     private Text txtDescription;
     private Button btnLoadDetails;
+    private Label lblNewLabel_3;
+    private ScrolledComposite scrolledComposite;
+    private List listSynonyms;
+    private Composite composite_3;
+    private Label lblNewLabel_4;
+    private Button btnRemoveVocabulary;
+    private TermVocabularyComboViewer termVocabularyComboViewer;
 
     public GfBioTerminologyImportComposite(Composite parent, int style) {
         super(parent, style);
@@ -65,6 +77,22 @@ public class GfBioTerminologyImportComposite extends Composite{
         btnSearch = new Button(composite, SWT.NONE);
         btnSearch.setText("Search");
 
+        composite_3 = new Composite(this, SWT.NONE);
+        composite_3.setLayout(new GridLayout(3, false));
+        composite_3.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, true, false, 1, 1));
+
+        lblNewLabel_4 = new Label(composite_3, SWT.NONE);
+        lblNewLabel_4.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+        lblNewLabel_4.setText("Import Vocabulary");
+
+        termVocabularyComboViewer = new TermVocabularyComboViewer(composite_3, SWT.NONE);
+        termVocabularyComboViewer.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, false, false, 1, 1));
+        termVocabularyComboViewer.setInput(CdmStore.getService(IVocabularyService.class).list(TermVocabulary.class, null, null, null, null));
+
+        btnRemoveVocabulary = new Button(composite_3, SWT.NONE);
+        btnRemoveVocabulary.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+        btnRemoveVocabulary.setImage(ImageResources.getImage(ImageResources.TRASH_ICON));
+
         composite_2 = new Composite(this, SWT.NONE);
         composite_2.setLayout(new GridLayout(2, false));
         composite_2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
@@ -130,4 +158,10 @@ public class GfBioTerminologyImportComposite extends Composite{
     public Button getBtnLoadDetails() {
         return btnLoadDetails;
     }
+    public TermVocabularyComboViewer getTermVocabularyComboViewer() {
+        return termVocabularyComboViewer;
+    }
+    public Button getBtnRemoveVocabulary() {
+        return btnRemoveVocabulary;
+    }
 }
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 1acdae23a..17012215f 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
@@ -99,7 +99,7 @@ public class GfBioTerminologyImportPresenter {
             }
         });
 
-        //combo
+        //terminology combo
         String response = new RequestTerminologies().request();
         if(response==null){
             MessagingUtils.informationDialog(NO_CONNECTION_TITLE, NO_CONNECTION_MESSAGE);
@@ -121,6 +121,14 @@ public class GfBioTerminologyImportPresenter {
             }
         });
 
+        //vocabulary combo
+        composite.getBtnRemoveVocabulary().addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                composite.getTermVocabularyComboViewer().setElement(null);
+            }
+        });
+
         composite.getBtnLoadDetails().addSelectionListener(new SelectionAdapter() {
             @Override
             public void widgetSelected(SelectionEvent e) {
@@ -167,6 +175,7 @@ public class GfBioTerminologyImportPresenter {
         composite.getLblLabel().setText("");
         composite.getLblUri().setText("");
         composite.getLblDescription().setText("");
+        composite.getListSynonyms().removeAll();
     }
 
     private void updateDetails(ISelection s) {
