private static @NotNull PsiElement @Nullable [] targetElements(@NotNull Editor editor, int offset) {
    final PsiElement element = TargetElementUtil.getInstance().findTargetElement(editor, ImplementationSearcher.getFlags(), offset);
    return new ImplementationSearcher() {
      @Override
      protected PsiElement @NotNull [] searchDefinitions(final PsiElement element, Editor editor) {
        final List<PsiElement> found = new ArrayList<>(2);
        DefinitionsScopedSearch.search(element, getSearchScope(element, editor)).forEach(psiElement -> {
          found.add(psiElement);
          return found.size() != 2;
        });
        return PsiUtilCore.toPsiElementArray(found);
      }
    }.searchImplementations(editor, element, offset);
  }
private static @NotNull PsiElement @Nullable [] targetElements(@NotNull Editor editor, int offset)