blob: eaafbd5d9c37aab413f7df6446533866e2bd77d2 [file] [log] [blame]
package com.intellij.codeInsight.completion.impl;
import com.intellij.codeInsight.lookup.LookupElement;
import com.intellij.codeInsight.lookup.LookupElementWeigher;
import com.intellij.codeInsight.lookup.WeighingContext;
import org.jetbrains.annotations.NotNull;
/**
* @author Peter
*/
public class PreferStartMatching extends LookupElementWeigher {
public PreferStartMatching() {
super("middleMatching", false, true);
}
@Override
public Comparable weigh(@NotNull LookupElement element, @NotNull WeighingContext context) {
return !CompletionServiceImpl.isStartMatch(element, context);
}
}