public void completeReference(final PsiReference reference, final Set<? super LookupElement> set, final @NotNull PsiElement position, final PsiFile file) {
    final CompletionVariant[] variants = findVariants(position, file);
    boolean hasApplicableVariants = false;
    for (CompletionVariant variant : variants) {
      if (variant.hasReferenceFilter()) {
        variant.addReferenceCompletions(reference, position, set, file, this);
        hasApplicableVariants = true;
      }
    }

    if (!hasApplicableVariants) {
      myGenericVariant.addReferenceCompletions(reference, position, set, file, this);
    }
  }
public void completeReference(final PsiReference reference, final Set<? super LookupElement> set, final @NotNull PsiElement position, final PsiFile file)