ui: fixate order of actions with same text/description in "Find Action"

This commit is contained in:
Aleksey Pivovarov
2018-04-16 16:08:11 +03:00
parent f0c48c75ee
commit ea70e95816
@@ -502,6 +502,10 @@ public class GotoActionModel implements ChooseByNameModel, Comparator<Object>, D
if (byGroup != 0) return byGroup;
int byDesc = StringUtil.compare(myPresentation.getDescription(), oPresentation.getDescription(), true);
if (byDesc != 0) return byDesc;
int byClassHashCode = Comparing.compare(myAction.getClass().hashCode(), o.myAction.getClass().hashCode());
if (byClassHashCode != 0) return byClassHashCode;
int byInstanceHashCode = Comparing.compare(myAction.hashCode(), o.myAction.hashCode());
if (byInstanceHashCode != 0) return byInstanceHashCode;
return 0;
}