mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
git: hide the "Branch default" update method from the settings: IDEA-229324
Follow-up: 0f787031 GitOrigin-RevId: 14f48354bb92e4bb68e31b4f9a45a03dc1b3f43a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2884a7eaf4
commit
30975c17fc
@@ -17,6 +17,7 @@ import com.intellij.openapi.ui.Messages
|
||||
import com.intellij.openapi.util.registry.Registry
|
||||
import com.intellij.openapi.vcs.ProjectLevelVcsManager
|
||||
import com.intellij.openapi.vcs.update.AbstractCommonUpdateAction
|
||||
import com.intellij.ui.CollectionComboBoxModel
|
||||
import com.intellij.ui.EnumComboBoxModel
|
||||
import com.intellij.ui.SimpleListCellRenderer
|
||||
import com.intellij.ui.components.JBLabel
|
||||
@@ -35,6 +36,7 @@ import git4idea.branch.GitBranchIncomingOutgoingManager
|
||||
import git4idea.i18n.GitBundle
|
||||
import git4idea.repo.GitRepositoryManager
|
||||
import git4idea.update.GitUpdateProjectInfoLogProperties
|
||||
import git4idea.update.getUpdateMethods
|
||||
import java.awt.Color
|
||||
import javax.swing.JLabel
|
||||
|
||||
@@ -213,7 +215,7 @@ internal class GitVcsPanel(private val project: Project,
|
||||
cell {
|
||||
label("Update method:")
|
||||
comboBox(
|
||||
EnumComboBoxModel(UpdateMethod::class.java),
|
||||
CollectionComboBoxModel(getUpdateMethods()),
|
||||
{ projectSettings.updateMethod },
|
||||
{ projectSettings.updateMethod = it!! },
|
||||
renderer = SimpleListCellRenderer.create<UpdateMethod>("", UpdateMethod::getName)
|
||||
|
||||
@@ -48,6 +48,7 @@ internal class GitUpdateOptionsPanel(private val settings: GitVcsSettings) {
|
||||
|
||||
fun updateFrom() = panel.reset()
|
||||
|
||||
private fun getUpdateMethods(): List<UpdateMethod> =
|
||||
UpdateMethod.values().filter { it != BRANCH_DEFAULT || Registry.`is`("git.update.project.dialog.branch.default") }
|
||||
}
|
||||
}
|
||||
|
||||
internal fun getUpdateMethods(): List<UpdateMethod> =
|
||||
UpdateMethod.values().filter { it != BRANCH_DEFAULT || Registry.`is`("git.update.project.dialog.branch.default") }
|
||||
|
||||
Reference in New Issue
Block a user