private static PsiElement findTarget(@NotNull Editor editor, @NotNull PsiFile file) {
    int offset = TargetElementUtil.adjustOffset(file, editor.getDocument(), editor.getCaretModel().getOffset());
    return file.findElementAt(offset);
  }
private static PsiElement findTarget(@NotNull Editor editor, @NotNull PsiFile file)