private void onSuccessImpl(final boolean wasCanceled) {
      if (!myProject.isOpen() || myProject.isDisposed()) {
        LocalHistory.getInstance().putSystemLabel(myProject, VcsBundle.message("activity.name.update")); // TODO check why this label is needed
        return;
      }
      boolean continueChain = false;
      for (SequentialUpdatesContext context : myContextInfo.values()) {
        continueChain |= (context != null) && (context.shouldFail());
      }
      final boolean continueChainFinal = continueChain;

      final boolean someSessionWasCancelled = wasCanceled || someSessionWasCanceled(myUpdateSessions);
      // here text conflicts might be interactively resolved
      for (final UpdateSession updateSession : myUpdateSessions) {
        updateSession.onRefreshFilesCompleted();
      }
      // only after conflicts are resolved, put a label
      if (myLocalHistoryAction != null) {
        myLocalHistoryAction.finish();
      }
      myAfter = LocalHistory.getInstance().putSystemLabel(myProject, VcsBundle.message("update.label.after.update"));

      if (myActionInfo.canChangeFileStatus()) {
        final List<VirtualFile> files = new ArrayList<>();
        final RemoteRevisionsCache revisionsCache = RemoteRevisionsCache.getInstance(myProject);
        revisionsCache.invalidate(myUpdatedFiles);
        UpdateFilesHelper.iterateFileGroupFiles(myUpdatedFiles, new UpdateFilesHelper.Callback() {
          @Override
          public void onFile(final String filePath, final String groupId) {
            @NonNls final String path = VfsUtilCore.pathToUrl(filePath.replace(File.separatorChar, '/'));
            final VirtualFile file = VirtualFileManager.getInstance().findFileByUrl(path);
            if (file != null) {
              files.add(file);
            }
          }
        });
        myDirtyScopeManager.filesDirty(files, null);
      }

      final boolean updateSuccess = !someSessionWasCancelled && myGroupedExceptions.isEmpty();

      if (myProject.isDisposed()) {
        StoreReloadManager.Companion.getInstance(myProject).unblockReloadingProjectOnExternalChanges();
        return;
      }

      if (!myGroupedExceptions.isEmpty()) {
        if (continueChainFinal) {
          gatherContextInterruptedMessages();
        }
        AbstractVcsHelper.getInstance(myProject).showErrors(myGroupedExceptions, VcsBundle.message("message.title.vcs.update.errors",
                                                                                                   myActionName));
      }
      else if (someSessionWasCancelled) {
        ProgressManager.progress(VcsBundle.message("progress.text.updating.canceled"));
      }
      else {
        ProgressManager.progress(VcsBundle.message("progress.text.updating.done"));
      }

      final boolean noMerged = myUpdatedFiles.getGroupById(FileGroup.MERGED_WITH_CONFLICT_ID).isEmpty();
      if (myUpdatedFiles.isEmpty() && myGroupedExceptions.isEmpty()) {
        NotificationType type;
        String content;
        if (someSessionWasCancelled) {
          content = VcsBundle.message("progress.text.updating.canceled");
          type = NotificationType.WARNING;
        }
        else {
          content = getAllFilesAreUpToDateMessage(myRoots);
          type = NotificationType.INFORMATION;
        }
        VcsNotifier.getInstance(myProject).notify(
          VcsNotifier.standardNotification().createNotification(content, type)
            .setDisplayId(VcsNotificationIdsHolder.PROJECT_UPDATE_FINISHED));
      }
      else if (!myUpdatedFiles.isEmpty()) {

        if (myUpdateSessions.size() == 1 && showsCustomNotification(myVcsToVirtualFiles.keySet())) {
          // multi-vcs projects behave as before: only a compound notification & file tree is shown for them, for the sake of simplicity
          myUpdateSessions.get(0).showNotification();
        }
        else {
          final UpdateInfoTree tree = showUpdateTree(continueChainFinal && updateSuccess && noMerged, someSessionWasCancelled);
          final CommittedChangesCache cache = CommittedChangesCache.getInstance(myProject);
          cache.processUpdatedFiles(myUpdatedFiles, incomingChangeLists -> tree.setChangeLists(incomingChangeLists));

          Notification notification = prepareNotification(tree, someSessionWasCancelled, myUpdateSessions);
          notification.addAction(new ViewUpdateInfoNotification(myProject, tree, VcsBundle.message("update.notification.content.view"), notification));
          VcsNotifier.getInstance(myProject).notify(notification);
        }
      }


      StoreReloadManager.Companion.getInstance(myProject).unblockReloadingProjectOnExternalChanges();

      if (continueChainFinal && updateSuccess) {
        if (!noMerged) {
          showContextInterruptedError();
        }
        else {
          // trigger next update; for CVS when updating from several branches simultaneously
          reset();
          ProgressManager.getInstance().run(this);
        }
      }
    }
private void onSuccessImpl(final boolean wasCanceled)