]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Sort symbol item contributions alphanumerically, not lexicographically 86/3786/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 16 Jan 2020 08:15:27 +0000 (10:15 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 16 Jan 2020 08:15:27 +0000 (10:15 +0200)
gitlab #445

Change-Id: I5efebb587654644a1f7cac85bdc03aea209dff2f

bundles/org.simantics.diagram/src/org/simantics/diagram/symbolcontribution/BasicSymbolProviderFactory.java

index 704ffda0ed6f0e18acbe08512f05aaadbb455fa2..ac934cc7ee2b7ed6b26b8bb45560d0ba71c44d12 100644 (file)
@@ -27,6 +27,7 @@ import org.simantics.diagram.stubs.DiagramResource;
 import org.simantics.diagram.symbollibrary.ISymbolGroup;
 import org.simantics.diagram.symbollibrary.ISymbolItem;
 import org.simantics.layer0.Layer0;
+import org.simantics.utils.strings.AlphanumComparator;
 
 /**
  * A basic SymbolProviderFactory implementation for the graph database. It is
@@ -152,7 +153,7 @@ public class BasicSymbolProviderFactory implements SymbolProviderFactory {
         Collections.sort(items, new Comparator<ISymbolItem>() {
             @Override
             public int compare(ISymbolItem o1, ISymbolItem o2) {
-                return o1.getName().compareToIgnoreCase(o2.getName());
+                return AlphanumComparator.CASE_INSENSITIVE_COMPARATOR.compare(o1.getName(), o2.getName());
             }
         });