public PsiElement @Nullable [] searchImplementations(PsiElement element,
                                                       Editor editor,
                                                       boolean includeSelfAlways,
                                                       boolean includeSelfIfNoOthers) {
    if (element == null) return PsiElement.EMPTY_ARRAY;
    PsiElement[] elements = searchDefinitions(element, editor);
    if (elements == null) return null; //the search has been cancelled
    if (elements.length > 0) return filterElements(element, includeSelfAlways ? ArrayUtil.prepend(element, elements) : elements);
    if (includeSelfAlways || includeSelfIfNoOthers) return new PsiElement[]{element};
    return PsiElement.EMPTY_ARRAY;
  }
public PsiElement @Nullable [] searchImplementations(PsiElement element,
                                                       Editor editor,
                                                       boolean includeSelfAlways,
                                                       boolean includeSelfIfNoOthers)