private void afterRename(List<? extends Runnable> postRenameCallbacks,
                           MultiMap<RefactoringElementListener, SmartPsiElementPointer<PsiElement>> renameEvents) {
    PsiDocumentManager.getInstance(myProject).commitAllDocuments();
    for (Map.Entry<RefactoringElementListener, Collection<SmartPsiElementPointer<PsiElement>>> entry : renameEvents.entrySet()) {
      for (SmartPsiElementPointer<PsiElement> pointer : entry.getValue()) {
        PsiElement element = pointer.getElement();
        if (element != null) {
          entry.getKey().elementRenamed(element);
        }
      }
    }

    for (Runnable runnable : postRenameCallbacks) {
      runnable.run();
    }

    if (!mySkippedUsages.isEmpty()) {
      if (!ApplicationManager.getApplication().isUnitTestMode() && !ApplicationManager.getApplication().isHeadlessEnvironment()) {
        ApplicationManager.getApplication().invokeLater(() -> {
          IdeFrame ideFrame = WindowManager.getInstance().getIdeFrame(myProject);
          if (ideFrame != null) {
            StatusBarEx statusBar = (StatusBarEx)ideFrame.getStatusBar();
            String message = LangBundle.message("popup.content.unable.to.rename.certain.usages");
            HyperlinkListener listener = e -> {
              if (e.getEventType() != HyperlinkEvent.EventType.ACTIVATED) return;
              String skipped =
                StringUtil.join(mySkippedUsages, unresolvableCollisionUsageInfo -> unresolvableCollisionUsageInfo.getDescription(), "<br>");
              Messages.showMessageDialog(RefactoringBundle.message("rename.not.all.usages.message", skipped),
                                         RefactoringBundle.message("rename.not.all.usages.title"), null);
            };
            statusBar.notifyProgressByBalloon(MessageType.WARNING, message, null, listener);
          }
        }, ModalityState.nonModal());
      }
    }
  }
private void afterRename(List<? extends Runnable> postRenameCallbacks,
                           MultiMap<RefactoringElementListener, SmartPsiElementPointer<PsiElement>> renameEvents)