Project

General

Profile

Revision 4b8701e3

ID4b8701e303636d9985993205ad3728a4ba1b0dac
Parent 0a0a634c
Child 5937d209

Added by Patrick Plitzner 2 months ago

ref #8011 Sort facets by category

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/search/facet/SearchController.java
11 11
import java.util.ArrayList;
12 12
import java.util.Collections;
13 13
import java.util.Comparator;
14
import java.util.HashMap;
15 14
import java.util.HashSet;
16 15
import java.util.List;
17 16
import java.util.Map;
18 17
import java.util.Map.Entry;
19 18
import java.util.Set;
19
import java.util.TreeMap;
20 20

  
21 21
import org.eclipse.jface.layout.GridDataFactory;
22 22
import org.eclipse.swt.SWT;
......
76 76
    }
77 77

  
78 78
    private void createFilterButtons(Set<Facet> facets) {
79
        Map<String, List<Facet>> categoryToFacetsMap = new HashMap<>();
79
        Map<String, List<Facet>> categoryToFacetsMap = new TreeMap<>((String o1, String o2)->o1.compareTo(o2));
80 80
        for (Facet facet : facets) {
81 81
            List<Facet> categoryFacets = categoryToFacetsMap.get(facet.getCategory());
82 82
            if(categoryFacets==null){

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)