void (@NotNull final PsiElement element, @NotNull Editor editor, @NotNull Pass<? super PsiElement> renameCallback) { final PsiElement psiElement = substituteElementToRename(element, editor); if (psiElement == null) return; if (!PsiElementRenameHandler.canRename(psiElement.getProject(), editor, psiElement)) return; renameCallback.accept(psiElement); }