package com.intellij.codeInsight.completion;

import com.intellij.codeInsight.lookup.LookupElement;
import org.jetbrains.annotations.NotNull;

/**
 * @author peter
 */
public abstract class PrefixMatcher {
  public static final PrefixMatcher FALSE_MATCHER = new PrefixMatcher("######################################") {

    public boolean prefixMatches(@NotNull final String name) {
      return false;
    }

    @NotNull
    public PrefixMatcher cloneWithPrefix(@NotNull final String prefix) {
      return this;
    }
  };
  protected final String myPrefix;

  protected PrefixMatcher(String prefix) {
    myPrefix = prefix;
  }

  public boolean prefixMatches(@NotNull LookupElement element) {
    for (String s : element.getAllLookupStrings()) {
      if (prefixMatches(s)) {
        return true;
      }
    }
    return false;
  }

  public abstract boolean prefixMatches(@NotNull String name);

  @NotNull
  public final String getPrefix() {
    return myPrefix;
  }

  @NotNull public abstract PrefixMatcher cloneWithPrefix(@NotNull String prefix);
}

@@ -203,329 +203,8 @@
 r %7B%0A
-  public static final PrefixMatcher FALSE_MATCHER = new PrefixMatcher(%22######################################%22) %7B%0A%0A    public boolean prefixMatches(@NotNull final String name) %7B%0A      return false;%0A    %7D%0A%0A    @NotNull%0A    public PrefixMatcher cloneWithPrefix(@NotNull final String prefix) %7B%0A      return this;%0A    %7D%0A  %7D;%0A
   pr

remove FALSE_MATCHER