boolean (@NotNull Project project, Editor editor, PsiFile file) { final int offset = editor.getCaretModel().getOffset(); PsiElement element = InjectedLanguageUtil.findInjectedPsiNoCommit(file, offset); if (element == null) { return InjectedReferencesContributor.isInjected(file.findReferenceAt(offset)); } return element.getUserData(LanguageInjectionSupport.INJECTOR_SUPPORT) != null; }