IDEA-241923 Search Everywhere: Misordering in Results

GitOrigin-RevId: 004bc76e98221824b439c252e6b5da0a7b7242a7
This commit is contained in:
Mikhail Sokolov
2020-06-18 21:09:40 +03:00
committed by intellij-monorepo-bot
parent a90d35f5ca
commit 660fe75d8e
3 changed files with 7 additions and 5 deletions
@@ -292,7 +292,7 @@ public final class GotoActionItemProvider implements ChooseByNameWeightedItemPro
.preferringStartMatches()
.build();
if (pattern.trim().contains(" ")) matcher = new ActionsPriorityMatcher(matcher);
if (pattern.trim().contains(" ")) matcher = new ActionPriorityWrapper(matcher);
return matcher;
}
@@ -304,10 +304,10 @@ public final class GotoActionItemProvider implements ChooseByNameWeightedItemPro
return null;
}
private static class ActionsPriorityMatcher extends MinusculeMatcherWrapper {
private static class ActionPriorityWrapper extends MinusculeMatcherWrapper {
private static final int ACTION_BONUS = 100;
protected ActionsPriorityMatcher(MinusculeMatcher delegate) {
protected ActionPriorityWrapper(MinusculeMatcher delegate) {
super(delegate);
}
@@ -222,7 +222,7 @@ public class GotoActionModel implements ChooseByNameModel, Comparator<Object>, D
@NotNull final String pattern;
final int matchingDegree;
public MatchedValue(@NotNull Object value, @NotNull String pattern) {
MatchedValue(@NotNull Object value, @NotNull String pattern) {
assert value instanceof OptionDescription || value instanceof ActionWrapper;
this.value = value;
this.pattern = pattern;
@@ -9,7 +9,9 @@ import org.jetbrains.annotations.Nullable;
public abstract class MinusculeMatcherWrapper extends MinusculeMatcher {
protected final MinusculeMatcher myDelegate;
protected MinusculeMatcherWrapper(MinusculeMatcher delegate) {myDelegate = delegate;}
protected MinusculeMatcherWrapper(MinusculeMatcher delegate) {
myDelegate = delegate;
}
@Override
@NotNull