[git] migration to Java 11: use explicit 'setUI' call instead of 'ui' property

...to fix "Val cannot be reassigned" error when compiling IntelliJ sources under Java 11 (see KT-31926).

GitOrigin-RevId: 4199c5c8944e2f320f5fcd7019e47f92cc50de45
This commit is contained in:
Nikolay Chashnikov
2020-06-11 18:36:47 +03:00
committed by intellij-monorepo-bot
parent c362d1b63f
commit 70d39ca07c
2 changed files with 8 additions and 8 deletions
@@ -252,7 +252,7 @@ class GitMergeDialog(private val project: Project,
isSwingPopup = false
val bw = DarculaUIUtil.BW.get()
ui = FlatComboBoxUI(outerInsets = Insets(bw, bw, bw, 0))
setUI(FlatComboBoxUI(outerInsets = Insets(bw, bw, bw, 0)))
addItemListener { e ->
if (e.stateChange == ItemEvent.SELECTED
@@ -276,9 +276,9 @@ class GitMergeDialog(private val project: Project,
val bw = DarculaUIUtil.BW.get()
ui = FlatComboBoxUI(
setUI(FlatComboBoxUI(
outerInsets = Insets(bw, 0, bw, bw),
popupEmptyText = GitBundle.message("merge.branch.popup.empty.text"))
popupEmptyText = GitBundle.message("merge.branch.popup.empty.text")))
}
}
@@ -306,7 +306,7 @@ class GitPullDialog(private val project: Project,
private fun createRepositoryField() = ComboBox(CollectionComboBoxModel(repositories)).apply {
isSwingPopup = false
renderer = SimpleListCellRenderer.create("") { DvcsUtil.getShortRepositoryName(it) }
ui = FlatComboBoxUI(outerInsets = Insets(1, 1, 1, 0))
setUI(FlatComboBoxUI(outerInsets = Insets(1, 1, 1, 0)))
item = repositories.find { repo -> repo.root == defaultRoot }
@@ -320,9 +320,9 @@ class GitPullDialog(private val project: Project,
isSwingPopup = false
renderer = SimpleListCellRenderer.create(GitBundle.message("util.remote.renderer.none")) { it.name }
val bw = DarculaUIUtil.BW.get()
ui = FlatComboBoxUI(
setUI(FlatComboBoxUI(
outerInsets = Insets(bw, 0, bw, 0),
popupEmptyText = GitBundle.message("pull.branch.no.matching.remotes"))
popupEmptyText = GitBundle.message("pull.branch.no.matching.remotes")))
item = getCurrentOrDefaultRemote(getRepository())
@@ -338,9 +338,9 @@ class GitPullDialog(private val project: Project,
isEditable = true
val bw = DarculaUIUtil.BW.get()
ui = FlatComboBoxUI(
setUI(FlatComboBoxUI(
Insets(1, 0, 1, 1),
Insets(bw, 0, bw, bw),
GitBundle.message("pull.branch.nothing.to.pull"))
GitBundle.message("pull.branch.nothing.to.pull")))
}
}