commit a1b92e88c96f07070ba65c778b4ebbc6a2a05835
Author: Patrick Plitzner <p.plitzner@bgbm.org>
Date:   Wed Jun 20 12:04:54 2018 +0200

    ref #7439 Remove sort type combo box

diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorQuery.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorQuery.java
index 378d54919..91a3c1e11 100644
--- a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorQuery.java
+++ b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorQuery.java
@@ -10,7 +10,6 @@
 package eu.etaxonomy.taxeditor.bulkeditor;
 
 import java.util.ArrayList;
-import java.util.Comparator;
 import java.util.List;
 
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
@@ -26,12 +25,10 @@ import eu.etaxonomy.cdm.persistence.query.OrderHint;
 public class BulkEditorQuery {
 
 	private final String searchString;
-	private final Comparator<?> comparator;
 	private final IIdentifiableEntityServiceConfigurator searchConfigurator;
 
-	public BulkEditorQuery (String searchString, Comparator comparator) {
+	public BulkEditorQuery (String searchString) {
 		this.searchString = searchString;
-		this.comparator = comparator;
 		List<String> propertyPath = new ArrayList<String>();
 		propertyPath.add("markers");
 		searchConfigurator = IdentifiableServiceConfiguratorFactory.getConfigurator(IdentifiableEntity.class);
@@ -42,10 +39,6 @@ public class BulkEditorQuery {
 		searchConfigurator.setPageSize(20);
 	}
 
-	public Comparator getComparator() {
-		return comparator;
-	}
-
 	public String getSearchString() {
 		return searchString;
 	}
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorSortCombo.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorSortCombo.java
deleted file mode 100644
index 258f91261..000000000
--- a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorSortCombo.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
-* Copyright (C) 2007 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.bulkeditor;
-
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-
-/**
- * @author n.hoffmann
- * @created Dec 14, 2010
- * @version 1.0
- */
-public class BulkEditorSortCombo {
-
-	private Label label;
-	
-	private Combo combo;
-	
-	private List<IBulkEditorSortProvider> sortProviders;
-		
-	private List<Comparator> comparators = new ArrayList<Comparator>();
-	
-	private int selectedIndex = 0;
-	
-	/**
-	 * 
-	 */
-	public BulkEditorSortCombo(Composite parent, List<IBulkEditorSortProvider> sortProviders) {
-		this.sortProviders = sortProviders;
-		if(! sortProviders.isEmpty()){
-			label = new Label(parent, SWT.NONE);
-			label.setText("Sort by");
-			
-			combo = new Combo(parent, SWT.DROP_DOWN);
-			
-			fillCombo();
-		}		
-	}
-	
-	/**
-	 * 
-	 */
-	private void fillCombo() {
-		for(IBulkEditorSortProvider sortProvider : sortProviders){
-			Set<String> names = sortProvider.getComparatorNames();
-			for(String name : names){
-				combo.add(name);
-				comparators.add(sortProvider.getComparatorByName(name));
-			}
-		}
-		
-		combo.addSelectionListener(new SelectionListener());
-		combo.select(selectedIndex);
-	}
-	
-	private class SelectionListener extends SelectionAdapter{
-		/* (non-Javadoc)
-		 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
-		 */
-		@Override
-		public void widgetSelected(SelectionEvent e) {
-			selectedIndex = combo.getSelectionIndex();
-		}
-	}
-	
-	/**
-	 * 
-	 */
-	public Comparator getSelection() {
-		return comparators.get(selectedIndex);
-	}
-}
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorE4.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorE4.java
index 7769058bc..d4b5019b3 100644
--- a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorE4.java
+++ b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorE4.java
@@ -158,7 +158,7 @@ public class BulkEditorE4 implements IPartContentHasDetails, IConversationEnable
 	    thisPart.setLabel(input.getEditorName());
 
         if(input.getEntityUuid()!=null){
-            performSearch(new BulkEditorQuery(input.getEntityUuid().toString(), null));
+            performSearch(new BulkEditorQuery(input.getEntityUuid().toString()));
         }
 
         createTable();
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorSearchE4.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorSearchE4.java
index 09d46ec04..69354bf25 100644
--- a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorSearchE4.java
+++ b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorSearchE4.java
@@ -9,8 +9,6 @@
 
 package eu.etaxonomy.taxeditor.bulkeditor.e4;
 
-import java.util.Comparator;
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.FocusEvent;
 import org.eclipse.swt.events.FocusListener;
@@ -29,7 +27,6 @@ import org.eclipse.ui.swt.IFocusService;
 
 import eu.etaxonomy.cdm.common.CdmUtils;
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditorQuery;
-import eu.etaxonomy.taxeditor.bulkeditor.BulkEditorSortCombo;
 import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.ColorResources;
 import eu.etaxonomy.taxeditor.preference.Resources;
@@ -51,7 +48,6 @@ public class BulkEditorSearchE4 {
 	private final BulkEditorE4 editor;
 
 	private Text text;
-	private BulkEditorSortCombo sortCombo;
 
 	private Button button;
 
@@ -76,8 +72,6 @@ public class BulkEditorSearchE4 {
 
 		createSearchTextField(container, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION);
 
-		createSortCombo(container, style);
-
 		button = new Button(container, SWT.PUSH);
 		button.setText(SEARCH);
 		button.addSelectionListener(new SelectionAdapter() {
@@ -90,11 +84,6 @@ public class BulkEditorSearchE4 {
 		registerAtFocusService();
 	}
 
-	private void createSortCombo(Composite parent, int style) {
-		sortCombo = new BulkEditorSortCombo(parent, editor.getEditorInput().getSortProviders());
-
-	}
-
 	/**
 	 * Handles focus changes for the textfield.
 	 */
@@ -162,7 +151,7 @@ public class BulkEditorSearchE4 {
 			return;
 		}
 
-		BulkEditorQuery query = new BulkEditorQuery(searchString, getComparator());
+		BulkEditorQuery query = new BulkEditorQuery(searchString);
 		editor.performSearch(query);
 	}
 
@@ -174,10 +163,6 @@ public class BulkEditorSearchE4 {
 		return text.getText().trim();
 	}
 
-	public Comparator getComparator() {
-		return sortCombo.getSelection();
-	}
-
 	public void setFocus() {
 		if(text != null && ! text.isDisposed()){
 			text.setFocus();
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AbstractBulkEditorInput.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AbstractBulkEditorInput.java
index db7a042ea..3c6aedb77 100644
--- a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AbstractBulkEditorInput.java
+++ b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AbstractBulkEditorInput.java
@@ -9,7 +9,6 @@
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
 import java.util.ArrayList;
-import java.util.Comparator;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -37,7 +36,6 @@ import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService;
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditorQuery;
 import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider;
 import eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.CdmBaseSortProvider;
-import eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.TitleCacheComparator;
 import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
 import eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput;
 import eu.etaxonomy.taxeditor.l10n.Messages;
@@ -162,8 +160,6 @@ public abstract class AbstractBulkEditorInput<T extends CdmBase> extends CdmEnti
 		else if(bulkEditorQuery != null){
 
 			IIdentifiableEntityServiceConfigurator configurator = bulkEditorQuery.getSearchConfigurator();
-			Comparator queryComparator = (bulkEditorQuery.getComparator() != null) ? bulkEditorQuery.getComparator() : new TitleCacheComparator();
-
 
             int pageSize = configurator.getPageSize()!=null?configurator.getPageSize():getPageSize();
 			long count = countEntities(configurator);
