in idea-plugin/src/main/java/org/jetbrains/bunches/idea/vcs/BunchToolWindowFactory.kt [38:57]
fun createCommitCheckToolWindowContent(
toolWindow: ToolWindow,
files: Set<VirtualFile>,
all: Map<PsiFile, List<PsiFile>>,
checkinProjectPanel: CheckinProjectPanel
) {
val window = SimpleCheckToolWindow(toolWindow, files, all, checkinProjectPanel)
val contentFactory = ContentFactory.SERVICE.getInstance()
val commitMessage = displayedCommitMessage(checkinProjectPanel.commitMessage)
val content = contentFactory.createContent(window.content, commitMessage, false)
toolWindow.contentManager.apply {
var index = contentCount
contents.filter { it.displayName != reduceDisplayName }.forEach {
index = getIndexOfContent(it)
removeContent(it, true)
}
toolWindow.setContent(content, index)
}
}