From ea70e95816279d6bc1fdcb87eb432bd3f5adb345 Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Mon, 16 Apr 2018 15:48:31 +0300 Subject: [PATCH] ui: fixate order of actions with same text/description in "Find Action" --- .../src/com/intellij/ide/util/gotoByName/GotoActionModel.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoActionModel.java b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoActionModel.java index 2a0bcddcf059..4513f978fad6 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoActionModel.java +++ b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoActionModel.java @@ -502,6 +502,10 @@ public class GotoActionModel implements ChooseByNameModel, Comparator, 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; }