PsiElement (@NotNull Editor editor, @NotNull Caret caret, @NotNull VirtualFile file) { final PsiFile psiFile = getPsiFile(editor, file); if (psiFile == null) return null; try { TargetElementUtil util = TargetElementUtil.getInstance(); return util.findTargetElement(editor, util.getReferenceSearchFlags(), caret.getOffset()); } catch (IndexNotReadyException e) { return null; } }