private static @Nullable PsiElement doFindTargetElementAtOffset(
    @NotNull Editor editor,
    int offset,
    @Nullable PsiFile file,
    @Nullable PsiElement contextElement
  ) {
    PsiElement element;

    element = customElement(editor, file, offset, contextElement);
    if (element != null) {
      return element;
    }

    element = fromTargetUtil(editor, offset, contextElement);
    if (element != null) {
      return element;
    }

    return fromReference(editor, offset);
  }
private static @Nullable PsiElement doFindTargetElementAtOffset(
    @NotNull Editor editor,
    int offset,
    @Nullable PsiFile file,
    @Nullable PsiElement contextElement
  )