From: Tuukka Lehtonen Date: Thu, 16 Jan 2020 08:15:27 +0000 (+0200) Subject: Sort symbol item contributions alphanumerically, not lexicographically X-Git-Tag: v1.43.0~136^2~1^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F86%2F3786%2F1;p=simantics%2Fplatform.git Sort symbol item contributions alphanumerically, not lexicographically gitlab #445 Change-Id: I5efebb587654644a1f7cac85bdc03aea209dff2f --- diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/symbolcontribution/BasicSymbolProviderFactory.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/symbolcontribution/BasicSymbolProviderFactory.java index 704ffda0e..ac934cc7e 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/symbolcontribution/BasicSymbolProviderFactory.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/symbolcontribution/BasicSymbolProviderFactory.java @@ -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() { @Override public int compare(ISymbolItem o1, ISymbolItem o2) { - return o1.getName().compareToIgnoreCase(o2.getName()); + return AlphanumComparator.CASE_INSENSITIVE_COMPARATOR.compare(o1.getName(), o2.getName()); } });