From 05269c19e7da21a4d1412c033c234d3baa97cc48 Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Thu, 25 Oct 2018 13:20:07 +0300 Subject: [PATCH] Use AlphaNum sorter in Symbol Library gitlab #158 Change-Id: I753ff1f6fcb0acda780f18645f489850147a5c4c --- .../diagram/symbolcontribution/CompositeSymbolGroup.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()]); -- 2.47.1