mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
git: show repositories and global actions for multi-repo projects without common branches in branches tree popup
GitOrigin-RevId: 2ce93df6b8090d13d8f7eaa3665427ca8ccf50d6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
29073685cd
commit
0386760e20
@@ -187,7 +187,8 @@ class GitBranchesTreePopup(project: Project, step: GitBranchesTreePopupStep, par
|
||||
traverseNodesAndExpand()
|
||||
expandPreviouslyExpandedBranches()
|
||||
}
|
||||
super.updateSpeedSearchColors(!haveBranches)
|
||||
val model = tree.model
|
||||
super.updateSpeedSearchColors(model.getChildCount(model.root) == 0)
|
||||
if (!pattern.isNullOrBlank()) {
|
||||
tree.emptyText.text = GitBundle.message("git.branches.popup.tree.no.branches", pattern)
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class GitBranchesTreeMultiRepoModel(
|
||||
|| (node === GitBranchType.REMOTE && commonRemoteBranchesTree.isEmpty())
|
||||
|
||||
private fun getChildren(parent: Any?): List<Any> {
|
||||
if (parent == null || !haveFilteredBranches()) return emptyList()
|
||||
if (parent == null) return emptyList()
|
||||
return when (parent) {
|
||||
TreeRoot -> getTopLevelNodes()
|
||||
is GitBranchType -> branchesTreeCache.getOrPut(parent) { getBranchTreeNodes(parent, emptyList()) }
|
||||
@@ -91,6 +91,4 @@ class GitBranchesTreeMultiRepoModel(
|
||||
|
||||
private fun getPreferredBranch(): GitBranch? =
|
||||
getPreferredBranch(project, repositories, null, commonLocalBranchesTree, commonRemoteBranchesTree)
|
||||
|
||||
private fun haveFilteredBranches(): Boolean = !commonLocalBranchesTree.isEmpty() || !commonRemoteBranchesTree.isEmpty()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user