From 543850b0bf61001d0fbb1bbcc3cb7cb2fc2b719f Mon Sep 17 00:00:00 2001 From: Pavel Porvatov Date: Mon, 4 Mar 2024 12:13:53 +0100 Subject: [PATCH] [Kotlin UI DSL] Hidden deprecated API GitOrigin-RevId: 0ac3dc9a9a143a4e5d7d416ffb8331b2acbd7622 --- .../platform-impl/src/com/intellij/ui/layout/Cell.kt | 10 ++++++---- .../platform-impl/src/com/intellij/ui/layout/Row.kt | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ui/layout/Cell.kt b/platform/platform-impl/src/com/intellij/ui/layout/Cell.kt index 3e8628dad6a7..da62b0cfdd30 100644 --- a/platform/platform-impl/src/com/intellij/ui/layout/Cell.kt +++ b/platform/platform-impl/src/com/intellij/ui/layout/Cell.kt @@ -1,4 +1,6 @@ // Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:Suppress("DEPRECATION") + package com.intellij.ui.layout import com.intellij.BundleBase @@ -219,13 +221,13 @@ fun CellBuilder.applyToComponent(task: T.() -> Unit): CellBu } @ApiStatus.ScheduledForRemoval -@Deprecated("Use Kotlin UI DSL Version 2") +@Deprecated("Use Kotlin UI DSL Version 2", level = DeprecationLevel.HIDDEN) fun CellBuilder.withTextBinding(modelBinding: PropertyBinding): CellBuilder { return withBindingInt(JTextComponent::getText, JTextComponent::setText, modelBinding) } @ApiStatus.ScheduledForRemoval -@Deprecated("Use Kotlin UI DSL Version 2") +@Deprecated("Use Kotlin UI DSL Version 2", level = DeprecationLevel.HIDDEN) fun CellBuilder.withSelectedBinding(modelBinding: PropertyBinding): CellBuilder { return withBindingInt(AbstractButton::isSelected, AbstractButton::setSelected, modelBinding) } @@ -357,7 +359,7 @@ abstract class Cell : BaseBuilder { modelBinding: PropertyBinding, @DetailedDescription comment: String?): CellBuilder { val component = JBCheckBox(text, modelBinding.get()) - return component(comment = comment).withSelectedBinding(modelBinding) + return component(comment = comment).withBindingInt(AbstractButton::isSelected, AbstractButton::setSelected, modelBinding) } @ApiStatus.ScheduledForRemoval @@ -429,7 +431,7 @@ abstract class Cell : BaseBuilder { @Deprecated("Use Kotlin UI DSL Version 2") fun textField(binding: PropertyBinding, columns: Int? = null): CellBuilder { return component(JBTextField(binding.get(), columns ?: 0)) - .withTextBinding(binding) + .withBindingInt(JTextComponent::getText, JTextComponent::setText, binding) } @ApiStatus.ScheduledForRemoval diff --git a/platform/platform-impl/src/com/intellij/ui/layout/Row.kt b/platform/platform-impl/src/com/intellij/ui/layout/Row.kt index f587959cb56d..1d53ac34cf8c 100644 --- a/platform/platform-impl/src/com/intellij/ui/layout/Row.kt +++ b/platform/platform-impl/src/com/intellij/ui/layout/Row.kt @@ -1,4 +1,6 @@ // Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:Suppress("DEPRECATION") + package com.intellij.ui.layout import com.intellij.openapi.util.NlsContexts