diff --git a/java/compiler/impl/src/com/intellij/compiler/options/CompilerUIConfigurableKt.kt b/java/compiler/impl/src/com/intellij/compiler/options/CompilerUIConfigurableKt.kt index 7f5e9f8d202f..3d329c7c3b94 100644 --- a/java/compiler/impl/src/com/intellij/compiler/options/CompilerUIConfigurableKt.kt +++ b/java/compiler/impl/src/com/intellij/compiler/options/CompilerUIConfigurableKt.kt @@ -57,10 +57,9 @@ class CompilerUIConfigurableKt(val project: Project) : DslConfigurableBase(), Se row(JavaCompilerBundle.message("label.option.resource.patterns.text")) { resourcePatternsField = cell(RawCommandLineEditor(ParametersListUtil.COLON_LINE_PARSER, ParametersListUtil.COLON_LINE_JOINER)) .comment(JavaCompilerBundle.message("compiler.ui.pattern.legend.text")) - .resizableColumn() .align(AlignX.FILL) + .contextHelp(JavaCompilerBundle.message("compiler.ui.pattern.context.help"), JavaCompilerBundle.message("compiler.ui.pattern.context.help.title")) .component - contextHelp(JavaCompilerBundle.message("compiler.ui.pattern.context.help"), JavaCompilerBundle.message("compiler.ui.pattern.context.help.title")) } .bottomGap(BottomGap.SMALL) @@ -99,11 +98,11 @@ class CompilerUIConfigurableKt(val project: Project) : DslConfigurableBase(), Se row { label(JavaCompilerBundle.message("settings.compile.independent.modules.in.parallel")) comboboxJpsParallelCompilation = comboBox(ParallelCompilationOption.entries) + .contextHelp( + title = JavaCompilerBundle.message("settings.parallel.module.compile.context.help.title"), + description = JavaCompilerBundle.message("settings.parallel.module.compile.context.help.description") + ) .component - contextHelp( - title = JavaCompilerBundle.message("settings.parallel.module.compile.context.help.title"), - description = JavaCompilerBundle.message("settings.parallel.module.compile.context.help.description") - ) } } diff --git a/java/java-impl/src/com/intellij/application/options/editor/JavaAutoImportOptions.kt b/java/java-impl/src/com/intellij/application/options/editor/JavaAutoImportOptions.kt index 53b3a8ebcf4e..9d3128cb670e 100644 --- a/java/java-impl/src/com/intellij/application/options/editor/JavaAutoImportOptions.kt +++ b/java/java-impl/src/com/intellij/application/options/editor/JavaAutoImportOptions.kt @@ -106,8 +106,7 @@ public class JavaAutoImportOptions(public val project: Project) : UiDslUnnamedCo row { checkBox(ApplicationBundle.message("checkbox.add.unambiguous.imports.on.the.fly")) .bindSelected(ciSettings::ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY) - .gap(RightGap.SMALL) - contextHelp(ApplicationBundle.message("help.add.unambiguous.imports")) + .contextHelp(ApplicationBundle.message("help.add.unambiguous.imports")) } row { checkBox(ApplicationBundle.message("checkbox.optimize.imports.on.the.fly")) diff --git a/platform/built-in-server/src/org/jetbrains/builtInWebServer/BuiltInServerConfigurableUi.kt b/platform/built-in-server/src/org/jetbrains/builtInWebServer/BuiltInServerConfigurableUi.kt index 1aa6652ecf62..b1fc6af0a6e4 100644 --- a/platform/built-in-server/src/org/jetbrains/builtInWebServer/BuiltInServerConfigurableUi.kt +++ b/platform/built-in-server/src/org/jetbrains/builtInWebServer/BuiltInServerConfigurableUi.kt @@ -19,6 +19,7 @@ internal class BuiltInServerConfigurableUi(@ConfigurableName private val display group(displayName) { row(BuiltInServerBundle.message("setting.value.builtin.server.port.label")) { builtInServerPort = cell(PortField()) + .contextHelp(BuiltInServerBundle.message("setting.builtin.server.tip")) .applyToComponent { min = 1024 addChangeListener { @@ -29,7 +30,6 @@ internal class BuiltInServerConfigurableUi(@ConfigurableName private val display else BuiltInServerBundle.message("checkbox.tooltip.can.t.be.enabled.for.default.port") } }.component - contextHelp(BuiltInServerBundle.message("setting.builtin.server.tip")) } row { builtInServerAvailableExternallyCheckBox = checkBox(BuiltInServerBundle.message("setting.value.can.accept.external.connections")).component diff --git a/platform/lang-impl/src/com/intellij/codeInsight/completion/command/configuration/CommandCompletionConfigurable.kt b/platform/lang-impl/src/com/intellij/codeInsight/completion/command/configuration/CommandCompletionConfigurable.kt index 4d4c91cf8651..5bb71c7960b8 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/completion/command/configuration/CommandCompletionConfigurable.kt +++ b/platform/lang-impl/src/com/intellij/codeInsight/completion/command/configuration/CommandCompletionConfigurable.kt @@ -36,9 +36,7 @@ class CommandCompletionConfigurableProvider : ConfigurableProvider() { completionEnabledCheckBox = checkBox(CodeInsightBundle.message("options.command.completion.enabled")) .bindSelected({ settings.state.isEnabled() }, { r -> settings.state.setEnabled(r) }) - .gap(RightGap.SMALL) - contextHelp(CodeInsightBundle.message("options.command.completion.display.comment")) - .gap(RightGap.SMALL) + .contextHelp(CodeInsightBundle.message("options.command.completion.display.comment")) } if (GroupedCompletionContributor.isGroupEnabledInApp()) { indent { diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/UiDslOptPaneRenderer.kt b/platform/lang-impl/src/com/intellij/codeInspection/ui/UiDslOptPaneRenderer.kt index d48da1b54d10..23c967f787bd 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/UiDslOptPaneRenderer.kt +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/UiDslOptPaneRenderer.kt @@ -185,8 +185,7 @@ class UiDslOptPaneRenderer : OptionPaneRenderer { .applyIf(component.hasResizableRow) { resizableRow() } .applyIf(component is OptNumber || component is OptString || component is OptCheckbox) { (component as OptDescribedComponent).description()?.let { - cell.gap(RightGap.SMALL) - contextHelp (HtmlBuilder().append(it).toString()) + cell.contextHelp(HtmlBuilder().append(it).toString()) } this } diff --git a/platform/platform-impl/internal/src/com/intellij/internal/ui/UnixInfoTestAction.kt b/platform/platform-impl/internal/src/com/intellij/internal/ui/UnixInfoTestAction.kt index 1b32bf0db6c5..b31f1e9dbdea 100644 --- a/platform/platform-impl/internal/src/com/intellij/internal/ui/UnixInfoTestAction.kt +++ b/platform/platform-impl/internal/src/com/intellij/internal/ui/UnixInfoTestAction.kt @@ -127,7 +127,7 @@ private class UnixInfoDialog(val project: Project?, dialogTitle: String) : } row("isTileWM:") { label(X11UiUtil.isTileWM().toString()) - contextHelp(X11UiUtil.TILE_WM.sorted().joinToString("
"), "Known Tile WMs") + .contextHelp(X11UiUtil.TILE_WM.sorted().joinToString("
"), "Known Tile WMs") } row("isWSL:") { label(X11UiUtil.isWSL().toString()) diff --git a/platform/platform-impl/internal/src/com/intellij/internal/ui/uiDslShowcase/DemoGaps.kt b/platform/platform-impl/internal/src/com/intellij/internal/ui/uiDslShowcase/DemoGaps.kt index b1f112e0c1df..f3e1d2f6b3ff 100644 --- a/platform/platform-impl/internal/src/com/intellij/internal/ui/uiDslShowcase/DemoGaps.kt +++ b/platform/platform-impl/internal/src/com/intellij/internal/ui/uiDslShowcase/DemoGaps.kt @@ -24,11 +24,6 @@ fun demoGaps(): DialogPanel { textField() .enabledIf(checkBox.selected) }.rowComment("Gaps after check boxes/radio buttons when they are intended to serve as labels") - row { - checkBox("Option") - .gap(RightGap.SMALL) - contextHelp("Option description") - }.rowComment("Gaps before context help") row("Width:") { textField() .gap(RightGap.SMALL) diff --git a/platform/platform-impl/src/com/intellij/ide/ui/AppearanceConfigurable.kt b/platform/platform-impl/src/com/intellij/ide/ui/AppearanceConfigurable.kt index e6ad2e84c0e8..a843750e2f42 100644 --- a/platform/platform-impl/src/com/intellij/ide/ui/AppearanceConfigurable.kt +++ b/platform/platform-impl/src/com/intellij/ide/ui/AppearanceConfigurable.kt @@ -417,8 +417,7 @@ internal class AppearanceConfigurable : BoundSearchableConfigurable(message("tit yield { checkBox(cdDnDWithAlt) } yield { checkBox(cdSmoothScrolling) - .gap(RightGap.SMALL) - contextHelp(message("checkbox.smooth.scrolling.description")) + .contextHelp(message("checkbox.smooth.scrolling.description")) } } if (ProjectWindowCustomizerService.getInstance().isAvailable()) { @@ -539,8 +538,7 @@ internal class AppearanceConfigurable : BoundSearchableConfigurable(message("tit twoColumnsRow( { checkBox(cdWidescreenToolWindowLayout) - .gap(RightGap.SMALL) - contextHelp(message("checkbox.widescreen.tool.window.layout.description")) + .contextHelp(message("checkbox.widescreen.tool.window.layout.description")) }, { checkBox(cdRememberSizeForEachToolWindowNewUI) }, ) @@ -549,8 +547,7 @@ internal class AppearanceConfigurable : BoundSearchableConfigurable(message("tit twoColumnsRow( { checkBox(cdWidescreenToolWindowLayout) - .gap(RightGap.SMALL) - contextHelp(message("checkbox.widescreen.tool.window.layout.description")) + .contextHelp(message("checkbox.widescreen.tool.window.layout.description")) }, { checkBox(cdRightToolWindowLayout) }, ) @@ -563,8 +560,7 @@ internal class AppearanceConfigurable : BoundSearchableConfigurable(message("tit twoColumnsRow( { checkBox(cdWidescreenToolWindowLayout) - .gap(RightGap.SMALL) - contextHelp(message("checkbox.widescreen.tool.window.layout.description")) + .contextHelp(message("checkbox.widescreen.tool.window.layout.description")) }, { checkBox(cdRightToolWindowLayout) }, ) diff --git a/platform/platform-impl/src/com/intellij/ui/dsl/builder/Row.kt b/platform/platform-impl/src/com/intellij/ui/dsl/builder/Row.kt index 07de06746041..e836a68a2372 100644 --- a/platform/platform-impl/src/com/intellij/ui/dsl/builder/Row.kt +++ b/platform/platform-impl/src/com/intellij/ui/dsl/builder/Row.kt @@ -282,6 +282,11 @@ interface Row { fun icon(icon: Icon): Cell + /** + * Use [Cell.contextHelp] to add context help for a specific component. The [Cell.contextHelp] method provides + * more functionality in terms of accessibility, automatically sets the correct gap between the component and the context help button, + * and links the context help to the component's visibility and enabled state. + */ fun contextHelp(@NlsContexts.Tooltip description: String, @TooltipTitle title: String? = null): Cell /** diff --git a/platform/platform-impl/src/com/intellij/ui/mouse/MouseWheelSmoothScrollOptions.kt b/platform/platform-impl/src/com/intellij/ui/mouse/MouseWheelSmoothScrollOptions.kt index f0621f8aed6a..569eb1e6be75 100644 --- a/platform/platform-impl/src/com/intellij/ui/mouse/MouseWheelSmoothScrollOptions.kt +++ b/platform/platform-impl/src/com/intellij/ui/mouse/MouseWheelSmoothScrollOptions.kt @@ -80,17 +80,16 @@ internal class MouseWheelSmoothScrollOptionsAction : DumbAwareAction(), ActionRe } panel { row { - checkBox(IdeBundle.message("checkbox.smooth.scrolling.enable.high.precision.timer")).also { - val checkbox = it.component - checkbox.addItemListener { - JBAnimatorHelper.setAvailable(checkbox.isSelected) + checkBox(IdeBundle.message("checkbox.smooth.scrolling.enable.high.precision.timer")).applyToComponent { + addItemListener { + JBAnimatorHelper.setAvailable(isSelected) if (JBAnimatorHelper.isAvailable() && isPlaying.get()) { JBAnimatorHelper.requestHighPrecisionTimer(myBezierPainter.animator) } } }.bindSelected(JBAnimatorHelper::isAvailable, JBAnimatorHelper::setAvailable) - contextHelp(IdeBundle.message("checkbox.smooth.scrolling.enable.high.precision.timer.help")) - rowComment(IdeBundle.message("checkbox.smooth.scrolling.enable.high.precision.timer.comments")) + .contextHelp(IdeBundle.message("checkbox.smooth.scrolling.enable.high.precision.timer.help")) + .comment(IdeBundle.message("checkbox.smooth.scrolling.enable.high.precision.timer.comments")) } }.visible(SystemInfoRt.isWindows) } diff --git a/platform/statistics/devkit/src/com/intellij/internal/statistic/devkit/actions/scheme/EventsTestSchemeGroupConfiguration.kt b/platform/statistics/devkit/src/com/intellij/internal/statistic/devkit/actions/scheme/EventsTestSchemeGroupConfiguration.kt index b5105e6193f2..08c1de8daa4a 100644 --- a/platform/statistics/devkit/src/com/intellij/internal/statistic/devkit/actions/scheme/EventsTestSchemeGroupConfiguration.kt +++ b/platform/statistics/devkit/src/com/intellij/internal/statistic/devkit/actions/scheme/EventsTestSchemeGroupConfiguration.kt @@ -99,21 +99,20 @@ class EventsTestSchemeGroupConfiguration(private val project: Project, buttonsGroup { row { customRulesRadioButton = radioButton(StatisticsBundle.message("stats.use.custom.validation.rules")) - .gap(RightGap.SMALL) + .contextHelp(StatisticsBundle.message("stats.test.scheme.custom.rules.help")) .selected(initialGroup.useCustomRules) .applyToComponent { addChangeListener { updateRulesOption() } }.component - contextHelp(StatisticsBundle.message("stats.test.scheme.custom.rules.help")) } row { allowAllEventsRadioButton = radioButton(StatisticsBundle.message("stats.allow.all.events")) + .contextHelp(StatisticsBundle.message("stats.allow.all.events.help")) .selected(!initialGroup.useCustomRules) .applyToComponent { icon(AllIcons.General.BalloonWarning12) addChangeListener { updateRulesOption() } }.component - contextHelp(StatisticsBundle.message("stats.allow.all.events.help")) } } row { diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/VcsDirectoryConfigurationPanel.kt b/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/VcsDirectoryConfigurationPanel.kt index 9839d7bcc659..a7e7c3b4efdd 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/VcsDirectoryConfigurationPanel.kt +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/VcsDirectoryConfigurationPanel.kt @@ -299,8 +299,7 @@ internal class VcsDirectoryConfigurationPanel(private val project: Project) : Di row { checkBox(VcsBundle.message("directory.mapping.checkbox.detect.vcs.mappings.automatically")) .bindSelected(sharedProjectSettings::isDetectVcsMappingsAutomatically) - .gap(RightGap.SMALL) - contextHelp(VcsBundle.message("directory.mapping.checkbox.detect.vcs.mappings.automatically.hint")) + .contextHelp(VcsBundle.message("directory.mapping.checkbox.detect.vcs.mappings.automatically.hint")) } if (!AbstractCommonUpdateAction.showsCustomNotification(vcsManager.getAllActiveVcss().asList())) { diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/settings/DebuggerGeneralConfigurable.kt b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/settings/DebuggerGeneralConfigurable.kt index a01fa79ddb1d..08058cc634e5 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/settings/DebuggerGeneralConfigurable.kt +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/settings/DebuggerGeneralConfigurable.kt @@ -30,9 +30,8 @@ internal class DebuggerGeneralConfigurable : BoundSearchableConfigurable("", "de if (Registry.get("debugger.mayBringDebuggeeWindowToFrontAfterResume.supported").asBoolean()) { row { checkBox(XDebuggerBundle.message("setting.show.target.process.window.after.resume")) - .gap(RightGap.SMALL) + .contextHelp(XDebuggerBundle.message("setting.show.target.process.window.after.resume.help.text")) .bindSelected(Registry.get("debugger.mayBringDebuggeeWindowToFrontAfterResume").toBooleanProperty()) - contextHelp(XDebuggerBundle.message("setting.show.target.process.window.after.resume.help.text")) } } row { diff --git a/plugins/completion-ml-ranking/src/com/intellij/completion/ml/settings/MLRankingConfigurable.kt b/plugins/completion-ml-ranking/src/com/intellij/completion/ml/settings/MLRankingConfigurable.kt index b51fbfe4d4ee..7eb31480c804 100644 --- a/plugins/completion-ml-ranking/src/com/intellij/completion/ml/settings/MLRankingConfigurable.kt +++ b/plugins/completion-ml-ranking/src/com/intellij/completion/ml/settings/MLRankingConfigurable.kt @@ -42,8 +42,7 @@ internal class MLRankingConfigurable(private val availableProviders: List projectSettings.syncSetting = if (isSelected) DvcsSyncSettings.Value.SYNC else DvcsSyncSettings.Value.DONT_SYNC }) - .gap(RightGap.SMALL) - contextHelp(DvcsBundle.message("sync.setting.description", HgVcs.DISPLAY_NAME.get())) + .contextHelp(DvcsBundle.message("sync.setting.description", HgVcs.DISPLAY_NAME.get())) } } } diff --git a/plugins/kotlin/project-wizard/gradle/src/org/jetbrains/kotlin/tools/projectWizard/gradle/GradleKotlinNewProjectWizard.kt b/plugins/kotlin/project-wizard/gradle/src/org/jetbrains/kotlin/tools/projectWizard/gradle/GradleKotlinNewProjectWizard.kt index df33fd029beb..bc21b1c2a62e 100644 --- a/plugins/kotlin/project-wizard/gradle/src/org/jetbrains/kotlin/tools/projectWizard/gradle/GradleKotlinNewProjectWizard.kt +++ b/plugins/kotlin/project-wizard/gradle/src/org/jetbrains/kotlin/tools/projectWizard/gradle/GradleKotlinNewProjectWizard.kt @@ -113,8 +113,7 @@ internal class GradleKotlinNewProjectWizard : BuildSystemKotlinNewProjectWizard .enabledIf(gradleDslProperty.equalsTo(GradleDsl.KOTLIN)) .whenStateChangedFromUi { logGenerateMultipleModulesChanged(it) } .onApply { logGenerateMultipleModulesFinished(shouldGenerateMultipleModules) } - - contextHelp(KotlinNewProjectWizardUIBundle.message("tooltip.project.wizard.new.project.generate.multiple.modules")) + .contextHelp(KotlinNewProjectWizardUIBundle.message("tooltip.project.wizard.new.project.generate.multiple.modules")) }.visibleIf(gradleDslProperty.equalsTo(GradleDsl.KOTLIN)) } diff --git a/plugins/kotlin/project-wizard/idea/src/org/jetbrains/kotlin/tools/projectWizard/IntelliJKotlinNewProjectWizard.kt b/plugins/kotlin/project-wizard/idea/src/org/jetbrains/kotlin/tools/projectWizard/IntelliJKotlinNewProjectWizard.kt index 44b1170eefda..64fe21f44613 100644 --- a/plugins/kotlin/project-wizard/idea/src/org/jetbrains/kotlin/tools/projectWizard/IntelliJKotlinNewProjectWizard.kt +++ b/plugins/kotlin/project-wizard/idea/src/org/jetbrains/kotlin/tools/projectWizard/IntelliJKotlinNewProjectWizard.kt @@ -71,8 +71,7 @@ internal class IntelliJKotlinNewProjectWizard : BuildSystemKotlinNewProjectWizar .bindSelected(useCompactProjectStructureProperty) .whenStateChangedFromUi { logUseCompactProjectStructureChanged(it) } .onApply { logUseCompactProjectStructureFinished(useCompactProjectStructure) } - .gap(RightGap.SMALL) - contextHelp(KotlinNewProjectWizardUIBundle.message("tooltip.project.wizard.new.project.use.compact.project.structure")) + .contextHelp(KotlinNewProjectWizardUIBundle.message("tooltip.project.wizard.new.project.use.compact.project.structure")) } } diff --git a/plugins/markdown/core/src/org/intellij/plugins/markdown/settings/MarkdownSettingsConfigurable.kt b/plugins/markdown/core/src/org/intellij/plugins/markdown/settings/MarkdownSettingsConfigurable.kt index 577908cfc191..a10a5836284b 100644 --- a/plugins/markdown/core/src/org/intellij/plugins/markdown/settings/MarkdownSettingsConfigurable.kt +++ b/plugins/markdown/core/src/org/intellij/plugins/markdown/settings/MarkdownSettingsConfigurable.kt @@ -305,7 +305,7 @@ internal class MarkdownSettingsConfigurable(private val project: Project): Bound { extensionsSettings.extensionsEnabledState[extension.id] = it} ).gap(RightGap.SMALL) extensionCheckBox.enabled((extension as? MarkdownExtensionWithExternalFiles)?.isAvailable ?: true) - contextHelp(extension.description).gap(RightGap.SMALL) + .contextHelp(extension.description) if ((extension as? MarkdownExtensionWithDownloadableFiles)?.isAvailable == false) { lateinit var installLink: Cell installLink = link(MarkdownBundle.message("markdown.settings.extension.install.label")) { diff --git a/plugins/terminal/src/org/jetbrains/plugins/terminal/TerminalOptionsConfigurable.kt b/plugins/terminal/src/org/jetbrains/plugins/terminal/TerminalOptionsConfigurable.kt index d0e37eea66e4..fa6476f22899 100644 --- a/plugins/terminal/src/org/jetbrains/plugins/terminal/TerminalOptionsConfigurable.kt +++ b/plugins/terminal/src/org/jetbrains/plugins/terminal/TerminalOptionsConfigurable.kt @@ -208,7 +208,7 @@ internal class TerminalOptionsConfigurable(private val project: Project) : Bound } row { radioButton(message("settings.shell.prompt"), value = TerminalPromptStyle.SHELL) - contextHelp(message("settings.shell.prompt.description")) + .contextHelp(message("settings.shell.prompt.description")) } }.bind(blockTerminalOptions::promptStyle) @@ -339,13 +339,11 @@ internal class TerminalOptionsConfigurable(private val project: Project) : Bound textField() .columns(4) .enabledIf(enforceContrastCheckbox.selected) - .gap(RightGap.SMALL) + .contextHelp(message("settings.enforce.minimum.contrast.ratio.description")) .bindText( getter = { optionsProvider.minContrastRatio.toFormattedString() }, setter = { optionsProvider.minContrastRatio = parseRatio(it) } ) - - contextHelp(message("settings.enforce.minimum.contrast.ratio.description")) }.visibleIf(terminalEngineComboBox.selectedValueIs(TerminalEngine.REWORKED)) row { checkBox(message("settings.show.separators.between.blocks")) diff --git a/python/src/com/jetbrains/python/black/configuration/BlackFormatterConfigurable.kt b/python/src/com/jetbrains/python/black/configuration/BlackFormatterConfigurable.kt index 1cff5ce3f285..5facbb8cfc56 100644 --- a/python/src/com/jetbrains/python/black/configuration/BlackFormatterConfigurable.kt +++ b/python/src/com/jetbrains/python/black/configuration/BlackFormatterConfigurable.kt @@ -90,9 +90,8 @@ class BlackFormatterConfigurable(val project: Project) : BoundConfigurable(PyBun executionModeComboBox = comboBox(EnumComboBoxModel( BlackFormatterConfiguration.ExecutionMode::class.java)) .applyToComponent { renderer = executionModeComboBoxRenderer } - .gap(RightGap.SMALL) + .contextHelp(PyBundle.message("black.execution.mode.tooltip.text")) .component - contextHelp(PyBundle.message("black.execution.mode.tooltip.text")) layout(RowLayout.LABEL_ALIGNED) } row { diff --git a/python/src/com/jetbrains/python/codeInsight/completion/PythonCodeCompletionConfigurable.kt b/python/src/com/jetbrains/python/codeInsight/completion/PythonCodeCompletionConfigurable.kt index 21d04dc37c31..7be6e159c9a6 100644 --- a/python/src/com/jetbrains/python/codeInsight/completion/PythonCodeCompletionConfigurable.kt +++ b/python/src/com/jetbrains/python/codeInsight/completion/PythonCodeCompletionConfigurable.kt @@ -3,7 +3,6 @@ package com.jetbrains.python.codeInsight.completion import com.intellij.openapi.options.Configurable import com.intellij.openapi.options.UiDslUnnamedConfigurable import com.intellij.ui.dsl.builder.Panel -import com.intellij.ui.dsl.builder.RightGap import com.intellij.ui.dsl.builder.bindSelected import com.jetbrains.python.PyBundle import com.jetbrains.python.codeInsight.PyCodeInsightSettings @@ -21,10 +20,8 @@ class PythonCodeCompletionConfigurable: UiDslUnnamedConfigurable.Simple(), Confi group(PyBundle.message("configurable.PythonCodeCompletionConfigurable.border.title")) { row { checkBox(PyBundle.message("configurable.PythonCodeCompletionConfigurable.checkbox.suggest.importable.names")) - .bindSelected({ settings.INCLUDE_IMPORTABLE_NAMES_IN_BASIC_COMPLETION }, - { settings.INCLUDE_IMPORTABLE_NAMES_IN_BASIC_COMPLETION = it }) - .gap(RightGap.SMALL) - contextHelp(PyBundle.message("configurable.PythonCodeCompletionConfigurable.checkbox.suggest.importable.names.help")) + .bindSelected(settings::INCLUDE_IMPORTABLE_NAMES_IN_BASIC_COMPLETION) + .contextHelp(PyBundle.message("configurable.PythonCodeCompletionConfigurable.checkbox.suggest.importable.names.help")) } } }