]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Use AlphaNum sorter in Symbol Library 55/2355/2
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Thu, 25 Oct 2018 10:20:07 +0000 (13:20 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 25 Oct 2018 11:39:43 +0000 (11:39 +0000)
gitlab #158

Change-Id: I753ff1f6fcb0acda780f18645f489850147a5c4c

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

index fc9c80650c6d9513fd680d0795db1449274cc076..c217de2f9591de468a42244fe5dc1f17d42fc761 100644 (file)
@@ -18,6 +18,7 @@ import java.util.Comparator;
 
 import org.simantics.diagram.symbollibrary.ISymbolGroup;
 import org.simantics.diagram.symbollibrary.ISymbolItem;
+import org.simantics.utils.strings.AlphanumComparator;
 
 /**
  * @author Hannu Niemist&ouml;
@@ -47,7 +48,7 @@ public class CompositeSymbolGroup extends ModifiableSymbolGroup {
         Collections.sort(items, new Comparator<ISymbolItem>() {
             @Override
             public int compare(ISymbolItem o1, ISymbolItem o2) {
-                return o1.getName().compareTo(o2.getName());
+                return AlphanumComparator.COMPARATOR.compare(o1.getName(),o2.getName());
             }
         });
         return items.toArray(new ISymbolItem[items.size()]);