public static @Nullable PsiElement findTargetElement(@NotNull Editor editor, int flags) {
    int offset = editor.getCaretModel().getOffset();
    return findTargetElement(editor, flags, offset);
  }
public static @Nullable PsiElement findTargetElement(@NotNull Editor editor, int flags)