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