boolean (String text, TemplateImpl inst) { myFixture.configureByText(XmlFileType.INSTANCE, text); PsiFile file = myFixture.getFile(); int offset = myFixture.getEditor().getCaretModel().getOffset(); return TemplateManagerImpl.isApplicable(inst, TemplateActionContext.expanding(file, offset)); }