Notification (@NotNull UpdateInfoTree tree, boolean someSessionWasCancelled, @NotNull List<? extends UpdateSession> updateSessions) { int allFilesCount = getUpdatedFilesCount(); String additionalContent = nullize(updateSessions.stream(). map(UpdateSession::getAdditionalNotificationContent). filter(nonNull()). collect(Collectors.joining(", "))); String title = someSessionWasCancelled ? VcsBundle.message("update.notification.title.project.partially.updated") : VcsBundle.message("update.notification.title.count.files.updated", allFilesCount); String content = someSessionWasCancelled ? VcsBundle.message("update.notification.content.files.updated", allFilesCount) : notNullize(prepareScopeUpdatedText(tree)); NotificationType type = someSessionWasCancelled ? NotificationType.WARNING : NotificationType.INFORMATION; if (additionalContent != null) { if (!content.isEmpty()) { content += BR; } content += additionalContent; } return STANDARD_NOTIFICATION.createNotification(title, content, type).setDisplayId(VcsNotificationIdsHolder.PROJECT_PARTIALLY_UPDATED); }