boolean (final @NotNull Collection<PsiReference> refs, @NotNull Collection<Pair<PsiElement, TextRange>> stringUsages, final @NotNull PsiElement scope, final @NotNull PsiFile containingFile) { if (appendAdditionalElement(refs, stringUsages)) { return super.buildTemplateAndStart(refs, stringUsages, scope, containingFile); } else { final RenameChooser renameChooser = new RenameChooser(myEditor) { @Override protected void runRenameTemplate(Collection<Pair<PsiElement, TextRange>> stringUsages) { if (!VariableInplaceRenamer.super.buildTemplateAndStart(refs, stringUsages, scope, containingFile)) { VariableInplaceRenameHandler.performDialogRename(myElementToRename, myEditor, DataManager.getInstance().getDataContext(myEditor.getContentComponent()), myInitialName); } } }; renameChooser.showChooser(refs, stringUsages); } return true; }