From: Marko Luukkainen Date: Thu, 25 Oct 2018 10:20:07 +0000 (+0300) Subject: Use AlphaNum sorter in Symbol Library X-Git-Tag: v1.43.0~136^2~316 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=a090a5d168c397d90ce129e851cc80a158b89d0b;p=simantics%2Fplatform.git Use AlphaNum sorter in Symbol Library gitlab #158 Change-Id: I753ff1f6fcb0acda780f18645f489850147a5c4c (cherry picked from commit 05269c19e7da21a4d1412c033c234d3baa97cc48) --- diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/symbolcontribution/CompositeSymbolGroup.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/symbolcontribution/CompositeSymbolGroup.java index fc9c80650..c217de2f9 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/symbolcontribution/CompositeSymbolGroup.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/symbolcontribution/CompositeSymbolGroup.java @@ -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ö @@ -47,7 +48,7 @@ public class CompositeSymbolGroup extends ModifiableSymbolGroup { Collections.sort(items, new Comparator() { @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()]);