boolean ( @NotNull Collection<PsiReference> refs, @NotNull Collection<Pair<PsiElement, TextRange>> stringUsages, @NotNull PsiElement scope, @NotNull PsiFile containingFile ) { myEditor.putUserData(INTRODUCE_RESTART, false); //noinspection ConstantConditions myEditor.getCaretModel().moveToOffset(getNameIdentifier().getTextOffset()); boolean result = super.buildTemplateAndStart(refs, stringUsages, scope, containingFile); TemplateState templateState = TemplateManagerImpl.getTemplateState(InjectedLanguageUtil.getTopLevelEditor(myEditor)); if (templateState != null && myDeclaration.getTypeReference() != null) { templateState.addTemplateStateListener(SpecifyTypeExplicitlyIntention.Companion.createTypeReferencePostprocessor(myDeclaration)); } return result; }