protected PsiElement @Nullable("For the case the search has been cancelled") [] searchDefinitions(PsiElement element, Editor editor) {
    Ref<PsiElement[]> result = Ref.create();
    if (!ProgressManager.getInstance().runProcessWithProgressSynchronously(
      () -> result.set(search(element, editor).toArray(PsiElement.EMPTY_ARRAY)),
      getSearchingForImplementations(), true, element.getProject())) {
      return null;
    }
    return result.get();
  }
protected PsiElement @Nullable("For the case the search has been cancelled") [] searchDefinitions(PsiElement element, Editor editor)