public static PsiElement @NotNull [] getSelfAndImplementations(Editor editor,
                                                                 @NotNull PsiElement element,
                                                                 @NotNull ImplementationSearcher handler,
                                                                 final boolean includeSelfAlways) {
    final PsiElement[] handlerImplementations = handler.searchImplementations(element, editor, includeSelfAlways, true);
    if (handlerImplementations.length > 0) return handlerImplementations;

    return ReadAction.compute(() -> {
      PsiElement psiElement = element;
      PsiFile psiFile = psiElement.getContainingFile();
      if (psiFile == null) {
        // Magically, it's null for ant property declarations.
        psiElement = psiElement.getNavigationElement();
        psiFile = psiElement.getContainingFile();
        if (psiFile == null) {
          return PsiElement.EMPTY_ARRAY;
        }
      }
      if (psiFile.getVirtualFile() != null && (psiElement.getTextRange() != null || psiElement instanceof PsiFile)) {
        return new PsiElement[]{psiElement};
      }
      return PsiElement.EMPTY_ARRAY;
    });
  }
public static PsiElement @NotNull [] getSelfAndImplementations(Editor editor,
                                                                 @NotNull PsiElement element,
                                                                 @NotNull ImplementationSearcher handler,
                                                                 final boolean includeSelfAlways)