From 5d47ba29508db83ff4540cf6f039b0f0fec2413a Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Fri, 28 Mar 2025 15:37:42 +0100 Subject: [PATCH] do not add opt-in com.intellij.openapi.util.IntellijInternalApi for the whole monorepo (part 2) GitOrigin-RevId: e4647db9b386df84fe54d8eeeba2f617d18c2e54 --- .../backwardRefs/IsUpToDateCheckStartupActivity.kt | 5 ++++- platform/configuration-store-impl/src/StateStorageBase.kt | 8 +++++--- .../platform/eel/provider/utils/eelProcessUtils.kt | 4 +++- .../platform/eel/provider/utils/eelTunnelUtils.kt | 4 +++- .../src/com/intellij/execution/processTools/ProcessExt.kt | 5 ++++- .../intellij/platform/ijent/spi/IjentSessionMediator.kt | 5 ++++- platform/object-serializer/src/xml/unifiedImpl.kt | 4 +++- .../ml/catboost/CatBoostResourcesModelMetadataReader.kt | 5 ++++- .../openapi/application/impl/SuspendingReadActionTest.kt | 6 ++++-- .../com/intellij/openapi/util/io/DiskQueryRelayTest.kt | 5 ++++- .../com/intellij/serviceContainer/ComponentManagerImpl.kt | 4 +++- .../com/intellij/platform/settings/SettingDescriptor.kt | 8 +++++--- .../webSymbols/utils/WebSymbolsIsolatedMappingScope.kt | 4 ++++ ...ethodShouldBerRequiresBlockingContextInspectionTest.kt | 5 ++++- .../devkit/inspections/UElementAsPsiInspectionTest.kt | 6 +++++- ...thodShouldBeRequiresBlockingContextInspectionKtTest.kt | 5 ++++- .../KotlinObjectRegisteredAsExtensionInspectionTest.kt | 5 ++++- .../kotlin/inspections/KtUElementAsPsiInspectionTest.kt | 5 ++++- .../missingApi/MissingRecentApiInspectionTest.kt | 5 ++++- .../jetbrains/idea/devkit/kotlin/util/ServiceUtilTest.kt | 5 ++++- .../WorkspaceEntityMutableFieldInspectionTest.kt | 5 ++++- .../src/K1CompanionObjectInExtensionInspectionSupport.kt | 5 ++++- .../core/SearchEverywhereEssentialContributorMarker.kt | 3 +++ .../ranking/core/SearchEverywhereMLSearchSession.kt | 3 +++ .../ranking/core/SearchEverywhereMlFeaturesCache.kt | 3 +++ .../SearchEverywhereMlElementFeatureValidationRule.kt | 3 +++ .../ranking/core/id/ActionKeyProvider.kt | 3 +++ .../ranking/core/id/CalculatorKeyProvider.kt | 3 +++ .../ranking/core/id/CommandInfoKeyProvider.kt | 3 +++ .../ranking/core/id/MissingKeyProviderCollector.kt | 3 +++ .../ranking/core/id/NavigationItemKeyProvider.kt | 3 +++ .../ranking/core/id/PsiElementKeyProvider.kt | 3 +++ .../core/id/PsiItemWithSimilarityElementKeyProvider.kt | 3 +++ .../ranking/core/id/RunConfigurationsKeyProvider.kt | 3 +++ .../core/id/SearchEverywhereMlOrderedItemIdProvider.kt | 2 ++ .../searchEverywhereMl/ranking/core/id/TextKeyProvider.kt | 3 +++ .../searchEverywhereMl/ranking/core/id/TypoKeyProvider.kt | 3 +++ .../ranking/core/model/SearchEverywhereMlModel.kt | 3 +++ .../ranking/core/SearchEverywhereFileRankingModelTest.kt | 3 +++ .../core/SearchEverywhereMlStatisticsCollectorTest.kt | 3 +++ .../ranking/vcs/SearchEverywhereVcsElementKeyProvider.kt | 3 +++ .../com/jetbrains/python/debugger/pydev/TableCommand.kt | 5 ++++- .../debugger/pydev/tables/PyDevCommandParameters.kt | 5 ++++- 43 files changed, 151 insertions(+), 28 deletions(-) diff --git a/java/compiler/impl/src/com/intellij/compiler/backwardRefs/IsUpToDateCheckStartupActivity.kt b/java/compiler/impl/src/com/intellij/compiler/backwardRefs/IsUpToDateCheckStartupActivity.kt index d1ace61c4f40..e97b42053bb4 100644 --- a/java/compiler/impl/src/com/intellij/compiler/backwardRefs/IsUpToDateCheckStartupActivity.kt +++ b/java/compiler/impl/src/com/intellij/compiler/backwardRefs/IsUpToDateCheckStartupActivity.kt @@ -1,4 +1,6 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package com.intellij.compiler.backwardRefs import com.intellij.compiler.impl.CompileDriver @@ -12,6 +14,7 @@ import com.intellij.openapi.progress.blockingContext import com.intellij.openapi.progress.coroutineToIndicator import com.intellij.openapi.project.Project import com.intellij.openapi.startup.ProjectActivity +import com.intellij.openapi.util.IntellijInternalApi import kotlinx.coroutines.ensureActive import kotlin.coroutines.coroutineContext diff --git a/platform/configuration-store-impl/src/StateStorageBase.kt b/platform/configuration-store-impl/src/StateStorageBase.kt index e8b625535d9e..c7aa3fd4fcf6 100644 --- a/platform/configuration-store-impl/src/StateStorageBase.kt +++ b/platform/configuration-store-impl/src/StateStorageBase.kt @@ -1,15 +1,17 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. @file:Suppress("ReplaceJavaStaticMethodWithKotlinAnalog", "ReplaceGetOrSet") @file:Internal -@file:OptIn(SettingsInternalApi::class) +@file:OptIn(SettingsInternalApi::class, IntellijInternalApi::class) package com.intellij.configurationStore import com.intellij.codeWithMe.ClientId -import com.intellij.openapi.components.* +import com.intellij.openapi.components.RoamingType +import com.intellij.openapi.components.StateStorage import com.intellij.openapi.components.impl.stores.ComponentStorageUtil import com.intellij.openapi.diagnostic.debug import com.intellij.openapi.extensions.PluginId +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.openapi.util.JDOMUtil import com.intellij.openapi.util.WriteExternalException import com.intellij.openapi.vfs.LargeFileWriteRequestor diff --git a/platform/eel-provider/src/com/intellij/platform/eel/provider/utils/eelProcessUtils.kt b/platform/eel-provider/src/com/intellij/platform/eel/provider/utils/eelProcessUtils.kt index 7253acb3f645..cd95b066ea14 100644 --- a/platform/eel-provider/src/com/intellij/platform/eel/provider/utils/eelProcessUtils.kt +++ b/platform/eel-provider/src/com/intellij/platform/eel/provider/utils/eelProcessUtils.kt @@ -1,7 +1,9 @@ // Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package com.intellij.platform.eel.provider.utils -import com.intellij.openapi.progress.runBlockingMaybeCancellable +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.platform.eel.* import com.intellij.platform.eel.path.EelPath import com.intellij.platform.eel.provider.ResultErrImpl diff --git a/platform/eel-provider/src/com/intellij/platform/eel/provider/utils/eelTunnelUtils.kt b/platform/eel-provider/src/com/intellij/platform/eel/provider/utils/eelTunnelUtils.kt index e028c5864479..cdc05180c4e5 100644 --- a/platform/eel-provider/src/com/intellij/platform/eel/provider/utils/eelTunnelUtils.kt +++ b/platform/eel-provider/src/com/intellij/platform/eel/provider/utils/eelTunnelUtils.kt @@ -1,9 +1,11 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. @file:JvmName("IjentTunnelsUtil") +@file:OptIn(IntellijInternalApi::class) package com.intellij.platform.eel.provider.utils import com.intellij.openapi.diagnostic.Logger +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.platform.eel.* import com.intellij.platform.eel.channels.EelReceiveChannel import com.intellij.platform.eel.channels.EelSendChannel diff --git a/platform/execution/src/com/intellij/execution/processTools/ProcessExt.kt b/platform/execution/src/com/intellij/execution/processTools/ProcessExt.kt index 650e2f093c23..c62618775d7f 100644 --- a/platform/execution/src/com/intellij/execution/processTools/ProcessExt.kt +++ b/platform/execution/src/com/intellij/execution/processTools/ProcessExt.kt @@ -1,6 +1,9 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package com.intellij.execution.processTools +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.util.io.computeDetached import kotlinx.coroutines.DelicateCoroutinesApi import kotlinx.coroutines.async diff --git a/platform/ijent/src/com/intellij/platform/ijent/spi/IjentSessionMediator.kt b/platform/ijent/src/com/intellij/platform/ijent/spi/IjentSessionMediator.kt index dedddc4e472b..e734fe5a410b 100644 --- a/platform/ijent/src/com/intellij/platform/ijent/spi/IjentSessionMediator.kt +++ b/platform/ijent/src/com/intellij/platform/ijent/spi/IjentSessionMediator.kt @@ -1,4 +1,6 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package com.intellij.platform.ijent.spi import com.intellij.openapi.diagnostic.Attachment @@ -6,6 +8,7 @@ import com.intellij.openapi.diagnostic.debug import com.intellij.openapi.diagnostic.logger import com.intellij.openapi.progress.Cancellation import com.intellij.openapi.progress.Cancellation.ensureActive +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.platform.ijent.IjentUnavailableException import com.intellij.platform.ijent.coroutineNameAppended import com.intellij.platform.ijent.spi.IjentSessionMediator.ProcessExitPolicy.* diff --git a/platform/object-serializer/src/xml/unifiedImpl.kt b/platform/object-serializer/src/xml/unifiedImpl.kt index 230a60618afe..eca9487c8262 100644 --- a/platform/object-serializer/src/xml/unifiedImpl.kt +++ b/platform/object-serializer/src/xml/unifiedImpl.kt @@ -1,11 +1,13 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. @file:ApiStatus.Internal @file:Suppress("ReplaceJavaStaticMethodWithKotlinAnalog") +@file:OptIn(IntellijInternalApi::class) package com.intellij.serialization.xml import com.intellij.openapi.diagnostic.logger import com.intellij.openapi.extensions.PluginId +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.platform.settings.JsonElementSettingSerializerDescriptor import com.intellij.platform.settings.SettingDescriptor import com.intellij.platform.settings.SettingTag diff --git a/platform/platform-impl/internal/src/com/intellij/internal/ml/catboost/CatBoostResourcesModelMetadataReader.kt b/platform/platform-impl/internal/src/com/intellij/internal/ml/catboost/CatBoostResourcesModelMetadataReader.kt index b646601544c7..a080c91f46a6 100644 --- a/platform/platform-impl/internal/src/com/intellij/internal/ml/catboost/CatBoostResourcesModelMetadataReader.kt +++ b/platform/platform-impl/internal/src/com/intellij/internal/ml/catboost/CatBoostResourcesModelMetadataReader.kt @@ -1,8 +1,11 @@ -// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package com.intellij.internal.ml.catboost import com.intellij.internal.ml.InconsistentMetadataException import com.intellij.internal.ml.ResourcesModelMetadataReader +import com.intellij.openapi.util.IntellijInternalApi class CatBoostResourcesModelMetadataReader(metadataHolder: Class<*>, featuresDirectory: String, diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/application/impl/SuspendingReadActionTest.kt b/platform/platform-tests/testSrc/com/intellij/openapi/application/impl/SuspendingReadActionTest.kt index f3ce5f1c4be7..2011fe60ae52 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/application/impl/SuspendingReadActionTest.kt +++ b/platform/platform-tests/testSrc/com/intellij/openapi/application/impl/SuspendingReadActionTest.kt @@ -1,10 +1,13 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package com.intellij.openapi.application.impl import com.intellij.openapi.application.* import com.intellij.openapi.application.ReadAction.CannotReadException import com.intellij.openapi.progress.* import com.intellij.openapi.util.Disposer +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.testFramework.common.timeoutRunBlocking import com.intellij.util.concurrency.ImplicitBlockingContextTest import com.intellij.util.concurrency.Semaphore @@ -19,7 +22,6 @@ import org.junit.jupiter.api.extension.ExtendWith import java.util.concurrent.atomic.AtomicInteger import kotlin.coroutines.Continuation import kotlin.coroutines.resume -import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.seconds import kotlinx.coroutines.sync.Semaphore as KSemaphore diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/util/io/DiskQueryRelayTest.kt b/platform/platform-tests/testSrc/com/intellij/openapi/util/io/DiskQueryRelayTest.kt index 2406883f3cc2..a6dccd016088 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/util/io/DiskQueryRelayTest.kt +++ b/platform/platform-tests/testSrc/com/intellij/openapi/util/io/DiskQueryRelayTest.kt @@ -1,7 +1,10 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package com.intellij.openapi.util.io import com.intellij.openapi.progress.ProcessCanceledException +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.openapi.vfs.DiskQueryRelay import com.intellij.testFramework.junit5.TestApplication import com.intellij.util.io.blockingDispatcher diff --git a/platform/service-container/src/com/intellij/serviceContainer/ComponentManagerImpl.kt b/platform/service-container/src/com/intellij/serviceContainer/ComponentManagerImpl.kt index 1543bb2a0465..3c5d4c06d001 100644 --- a/platform/service-container/src/com/intellij/serviceContainer/ComponentManagerImpl.kt +++ b/platform/service-container/src/com/intellij/serviceContainer/ComponentManagerImpl.kt @@ -1,6 +1,7 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. @file:Suppress("ReplaceGetOrSet", "LeakingThis", "ReplaceJavaStaticMethodWithKotlinAnalog") @file:Internal +@file:OptIn(IntellijInternalApi::class) package com.intellij.serviceContainer @@ -36,6 +37,7 @@ import com.intellij.openapi.extensions.impl.createExtensionPoints import com.intellij.openapi.progress.* import com.intellij.openapi.util.Condition import com.intellij.openapi.util.Disposer +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.openapi.util.UserDataHolderBase import com.intellij.platform.instanceContainer.internal.* import com.intellij.platform.util.coroutines.childScope diff --git a/platform/settings/src/com/intellij/platform/settings/SettingDescriptor.kt b/platform/settings/src/com/intellij/platform/settings/SettingDescriptor.kt index 6117ad18d3e9..dfb7d001f851 100644 --- a/platform/settings/src/com/intellij/platform/settings/SettingDescriptor.kt +++ b/platform/settings/src/com/intellij/platform/settings/SettingDescriptor.kt @@ -1,5 +1,6 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. @file:Suppress("ReplaceJavaStaticMethodWithKotlinAnalog") +@file:OptIn(IntellijInternalApi::class) package com.intellij.platform.settings @@ -7,6 +8,7 @@ import com.intellij.openapi.extensions.PluginId import com.intellij.openapi.util.IntellijInternalApi import com.intellij.util.concurrency.annotations.RequiresBackgroundThread import org.jetbrains.annotations.ApiStatus.Internal +import java.util.List class SettingDescriptor @IntellijInternalApi @Internal constructor( /** @@ -24,7 +26,7 @@ class SettingDescriptor @IntellijInternalApi @Internal constructor( val serializer: SettingSerializerDescriptor, ) { class Builder @PublishedApi internal constructor() { - var tags: Collection = java.util.List.of() + var tags: Collection = List.of() @PublishedApi internal fun build(key: String, pluginId: PluginId, serializer: SettingSerializerDescriptor): SettingDescriptor { @@ -59,7 +61,7 @@ class SettingDescriptor @IntellijInternalApi @Internal constructor( return result } - override fun toString() = "SettingDescriptor(key=$key, pluginId=$pluginId, tags=$tags, serializer=$serializer)" + override fun toString(): String = "SettingDescriptor(key=$key, pluginId=$pluginId, tags=$tags, serializer=$serializer)" @Internal // impl note - even for an internal usage, we do not allow providing arbitrary name here; that's why "sub" diff --git a/platform/webSymbols/src/com/intellij/webSymbols/utils/WebSymbolsIsolatedMappingScope.kt b/platform/webSymbols/src/com/intellij/webSymbols/utils/WebSymbolsIsolatedMappingScope.kt index fe98663b52d0..6d9d786437d3 100644 --- a/platform/webSymbols/src/com/intellij/webSymbols/utils/WebSymbolsIsolatedMappingScope.kt +++ b/platform/webSymbols/src/com/intellij/webSymbols/utils/WebSymbolsIsolatedMappingScope.kt @@ -1,5 +1,9 @@ +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package com.intellij.webSymbols.utils +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.openapi.util.RecursionManager import com.intellij.psi.PsiElement import com.intellij.psi.util.CachedValueProvider diff --git a/plugins/devkit/devkit-java-tests/testSrc/org/jetbrains/idea/devkit/inspections/CallingJavaMethodShouldBerRequiresBlockingContextInspectionTest.kt b/plugins/devkit/devkit-java-tests/testSrc/org/jetbrains/idea/devkit/inspections/CallingJavaMethodShouldBerRequiresBlockingContextInspectionTest.kt index f6ddd8f03c47..fb859c91e1ba 100644 --- a/plugins/devkit/devkit-java-tests/testSrc/org/jetbrains/idea/devkit/inspections/CallingJavaMethodShouldBerRequiresBlockingContextInspectionTest.kt +++ b/plugins/devkit/devkit-java-tests/testSrc/org/jetbrains/idea/devkit/inspections/CallingJavaMethodShouldBerRequiresBlockingContextInspectionTest.kt @@ -1,6 +1,9 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package org.jetbrains.idea.devkit.inspections +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase import junit.framework.TestCase import org.junit.Before diff --git a/plugins/devkit/devkit-java-tests/testSrc/org/jetbrains/idea/devkit/inspections/UElementAsPsiInspectionTest.kt b/plugins/devkit/devkit-java-tests/testSrc/org/jetbrains/idea/devkit/inspections/UElementAsPsiInspectionTest.kt index d9cf3b808f48..b9c3d789b6be 100644 --- a/plugins/devkit/devkit-java-tests/testSrc/org/jetbrains/idea/devkit/inspections/UElementAsPsiInspectionTest.kt +++ b/plugins/devkit/devkit-java-tests/testSrc/org/jetbrains/idea/devkit/inspections/UElementAsPsiInspectionTest.kt @@ -1,6 +1,10 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package org.jetbrains.idea.devkit.inspections +import com.intellij.openapi.util.IntellijInternalApi + class UElementAsPsiInspectionTest : PluginModuleTestCase() { override fun setUp() { diff --git a/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/inspections/CallingMethodShouldBeRequiresBlockingContextInspectionKtTest.kt b/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/inspections/CallingMethodShouldBeRequiresBlockingContextInspectionKtTest.kt index 3fff0d2b8039..f40d7fe77c9c 100644 --- a/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/inspections/CallingMethodShouldBeRequiresBlockingContextInspectionKtTest.kt +++ b/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/inspections/CallingMethodShouldBeRequiresBlockingContextInspectionKtTest.kt @@ -1,6 +1,9 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package org.jetbrains.idea.devkit.kotlin.inspections +import com.intellij.openapi.util.IntellijInternalApi import org.jetbrains.idea.devkit.inspections.CallingMethodShouldBeRequiresBlockingContextInspection import org.junit.Before import org.junit.Test diff --git a/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/inspections/KotlinObjectRegisteredAsExtensionInspectionTest.kt b/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/inspections/KotlinObjectRegisteredAsExtensionInspectionTest.kt index 9f0e26fb4c37..ac622761e021 100644 --- a/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/inspections/KotlinObjectRegisteredAsExtensionInspectionTest.kt +++ b/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/inspections/KotlinObjectRegisteredAsExtensionInspectionTest.kt @@ -1,6 +1,9 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package org.jetbrains.idea.devkit.kotlin.inspections +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.testFramework.TestDataPath import org.jetbrains.idea.devkit.kotlin.DevkitKtTestsUtil diff --git a/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/inspections/KtUElementAsPsiInspectionTest.kt b/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/inspections/KtUElementAsPsiInspectionTest.kt index 149073cc625a..e8145329816a 100644 --- a/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/inspections/KtUElementAsPsiInspectionTest.kt +++ b/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/inspections/KtUElementAsPsiInspectionTest.kt @@ -1,6 +1,9 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package org.jetbrains.idea.devkit.kotlin.inspections +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase import org.jetbrains.idea.devkit.inspections.UElementAsPsiInspection diff --git a/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/inspections/missingApi/MissingRecentApiInspectionTest.kt b/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/inspections/missingApi/MissingRecentApiInspectionTest.kt index c725c47d9a3f..e5b6b56d1a59 100644 --- a/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/inspections/missingApi/MissingRecentApiInspectionTest.kt +++ b/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/inspections/missingApi/MissingRecentApiInspectionTest.kt @@ -1,10 +1,13 @@ -// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package org.jetbrains.idea.devkit.kotlin.inspections.missingApi import com.intellij.codeInsight.AnnotationUtil import com.intellij.openapi.module.Module import com.intellij.openapi.roots.ContentEntry import com.intellij.openapi.roots.ModifiableRootModel +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.openapi.vfs.VirtualFileFilter import com.intellij.pom.java.LanguageLevel import com.intellij.testFramework.PsiTestUtil diff --git a/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/util/ServiceUtilTest.kt b/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/util/ServiceUtilTest.kt index 96b123e2d2be..8f35ff5bf1fd 100644 --- a/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/util/ServiceUtilTest.kt +++ b/plugins/devkit/devkit-kotlin-tests/testSrc/org/jetbrains/idea/devkit/kotlin/util/ServiceUtilTest.kt @@ -1,7 +1,10 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package org.jetbrains.idea.devkit.kotlin.util import com.intellij.openapi.components.Service +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.testFramework.TestDataPath import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase import org.jetbrains.idea.devkit.inspections.LevelType diff --git a/plugins/devkit/intellij.devkit.workspaceModel/tests/testSrc/inspections/WorkspaceEntityMutableFieldInspectionTest.kt b/plugins/devkit/intellij.devkit.workspaceModel/tests/testSrc/inspections/WorkspaceEntityMutableFieldInspectionTest.kt index bd3ebc1e508f..005dba715074 100644 --- a/plugins/devkit/intellij.devkit.workspaceModel/tests/testSrc/inspections/WorkspaceEntityMutableFieldInspectionTest.kt +++ b/plugins/devkit/intellij.devkit.workspaceModel/tests/testSrc/inspections/WorkspaceEntityMutableFieldInspectionTest.kt @@ -1,7 +1,10 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package com.intellij.devkit.workspaceModel.inspections import com.intellij.devkit.workspaceModel.WorkspaceEntityMutableFieldInspection +import com.intellij.openapi.util.IntellijInternalApi class WorkspaceEntityMutableFieldInspectionTest: WorkspaceEntityInspectionBase() { override fun setUp() { diff --git a/plugins/devkit/intellij.kotlin.devkit/k1/src/K1CompanionObjectInExtensionInspectionSupport.kt b/plugins/devkit/intellij.kotlin.devkit/k1/src/K1CompanionObjectInExtensionInspectionSupport.kt index 36819641cb92..b9b609d514ac 100644 --- a/plugins/devkit/intellij.kotlin.devkit/k1/src/K1CompanionObjectInExtensionInspectionSupport.kt +++ b/plugins/devkit/intellij.kotlin.devkit/k1/src/K1CompanionObjectInExtensionInspectionSupport.kt @@ -1,4 +1,6 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package org.jetbrains.idea.devkit.kotlin.k1 import com.intellij.codeInsight.FileModificationService @@ -7,6 +9,7 @@ import com.intellij.openapi.application.WriteAction import com.intellij.openapi.command.CommandProcessor import com.intellij.openapi.project.Project import com.intellij.openapi.util.EmptyRunnable +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.psi.PsiElement import com.intellij.psi.PsiFile import com.intellij.psi.util.PsiEditorUtil diff --git a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereEssentialContributorMarker.kt b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereEssentialContributorMarker.kt index b8f496fc4068..1293348e6623 100644 --- a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereEssentialContributorMarker.kt +++ b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereEssentialContributorMarker.kt @@ -1,9 +1,12 @@ +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.core import com.intellij.ide.actions.searcheverywhere.SearchEverywhereContributor import com.intellij.ide.actions.searcheverywhere.SearchEverywhereEssentialContributorMarker import com.intellij.internal.statistic.eventLog.events.EventPair import com.intellij.openapi.diagnostic.thisLogger +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.openapi.util.registry.Registry import com.intellij.searchEverywhereMl.SearchEverywhereMlExperiment import com.intellij.searchEverywhereMl.SearchEverywhereTabWithMlRanking diff --git a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereMLSearchSession.kt b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereMLSearchSession.kt index 4f382290ea54..5ad3af32ec62 100644 --- a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereMLSearchSession.kt +++ b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereMLSearchSession.kt @@ -1,4 +1,6 @@ // Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.core import ai.grazie.emb.FloatTextEmbedding @@ -10,6 +12,7 @@ import com.intellij.ide.util.scopeChooser.ScopeDescriptor import com.intellij.internal.statistic.eventLog.events.EventPair import com.intellij.openapi.components.service import com.intellij.openapi.project.Project +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.searchEverywhereMl.SearchEverywhereMlExperiment import com.intellij.searchEverywhereMl.TextEmbeddingProvider import com.intellij.searchEverywhereMl.ranking.core.features.FeaturesProviderCacheDataProvider diff --git a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereMlFeaturesCache.kt b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereMlFeaturesCache.kt index 0d3dfafd6ea0..ecb5423c6cb1 100644 --- a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereMlFeaturesCache.kt +++ b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereMlFeaturesCache.kt @@ -1,3 +1,5 @@ +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.core import com.intellij.ide.util.gotoByName.GotoActionModel @@ -6,6 +8,7 @@ import com.intellij.internal.statistic.eventLog.events.ObjectEventData import com.intellij.openapi.actionSystem.ActionManager import com.intellij.openapi.application.ReadAction import com.intellij.openapi.project.Project +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.searchEverywhereMl.ranking.core.id.SearchEverywhereMlItemIdProvider import kotlin.math.round diff --git a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/features/SearchEverywhereMlElementFeatureValidationRule.kt b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/features/SearchEverywhereMlElementFeatureValidationRule.kt index 819a10569668..fc4c0dc17769 100644 --- a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/features/SearchEverywhereMlElementFeatureValidationRule.kt +++ b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/features/SearchEverywhereMlElementFeatureValidationRule.kt @@ -1,8 +1,11 @@ +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.core.features import com.intellij.internal.statistic.eventLog.validator.ValidationResultType import com.intellij.internal.statistic.eventLog.validator.rules.EventContext import com.intellij.internal.statistic.eventLog.validator.rules.impl.CustomValidationRule +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.searchEverywhereMl.ranking.core.SearchEverywhereMLStatisticsCollector internal class SearchEverywhereMlElementFeatureValidationRule : CustomValidationRule() { diff --git a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/ActionKeyProvider.kt b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/ActionKeyProvider.kt index cf26d79304b8..e982ead1366c 100644 --- a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/ActionKeyProvider.kt +++ b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/ActionKeyProvider.kt @@ -1,8 +1,11 @@ +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.core.id import com.intellij.ide.ui.search.OptionDescription import com.intellij.ide.util.gotoByName.GotoActionModel import com.intellij.openapi.actionSystem.AnAction +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.searchEverywhereMl.ranking.ext.SearchEverywhereElementKeyProvider private class ActionKeyProvider: SearchEverywhereElementKeyProvider { diff --git a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/CalculatorKeyProvider.kt b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/CalculatorKeyProvider.kt index 1965b433e98f..a425a4a2e7fb 100644 --- a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/CalculatorKeyProvider.kt +++ b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/CalculatorKeyProvider.kt @@ -1,6 +1,9 @@ +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.core.id import com.intellij.ide.actions.searcheverywhere.EvaluationResult +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.searchEverywhereMl.ranking.ext.SearchEverywhereElementKeyProvider private class CalculatorKeyProvider: SearchEverywhereElementKeyProvider { diff --git a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/CommandInfoKeyProvider.kt b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/CommandInfoKeyProvider.kt index 32f4776577c3..b90b40f0cafb 100644 --- a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/CommandInfoKeyProvider.kt +++ b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/CommandInfoKeyProvider.kt @@ -1,6 +1,9 @@ +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.core.id import com.intellij.ide.actions.searcheverywhere.SearchEverywhereCommandInfo +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.searchEverywhereMl.ranking.ext.SearchEverywhereElementKeyProvider internal class CommandInfoKeyProvider : SearchEverywhereElementKeyProvider { diff --git a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/MissingKeyProviderCollector.kt b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/MissingKeyProviderCollector.kt index 3a423cd4101d..8763fca408ac 100644 --- a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/MissingKeyProviderCollector.kt +++ b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/MissingKeyProviderCollector.kt @@ -1,5 +1,8 @@ +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.core.id +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.searchEverywhereMl.ranking.core.SearchEverywhereMLStatisticsCollector.KEY_NOT_COMPUTED_EVENT import com.intellij.searchEverywhereMl.ranking.core.id.MissingKeyProviderCollector.report diff --git a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/NavigationItemKeyProvider.kt b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/NavigationItemKeyProvider.kt index 82e1e373827e..0fd88d2cd892 100644 --- a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/NavigationItemKeyProvider.kt +++ b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/NavigationItemKeyProvider.kt @@ -1,8 +1,11 @@ +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.core.id import com.intellij.navigation.NavigationItem import com.intellij.navigation.PsiElementNavigationItem import com.intellij.openapi.application.runReadAction +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.searchEverywhereMl.ranking.ext.SearchEverywhereElementKeyProvider private class NavigationItemKeyProvider : SearchEverywhereElementKeyProvider { diff --git a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/PsiElementKeyProvider.kt b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/PsiElementKeyProvider.kt index c7336f573f63..20fc65a32a26 100644 --- a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/PsiElementKeyProvider.kt +++ b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/PsiElementKeyProvider.kt @@ -1,6 +1,9 @@ +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.core.id import com.intellij.ide.actions.searcheverywhere.PSIPresentationBgRendererWrapper +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.psi.PsiElement import com.intellij.searchEverywhereMl.ranking.ext.SearchEverywhereElementKeyProvider diff --git a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/PsiItemWithSimilarityElementKeyProvider.kt b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/PsiItemWithSimilarityElementKeyProvider.kt index 509f988755e7..a660109080d9 100644 --- a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/PsiItemWithSimilarityElementKeyProvider.kt +++ b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/PsiItemWithSimilarityElementKeyProvider.kt @@ -1,6 +1,9 @@ +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.core.id import com.intellij.ide.actions.searcheverywhere.PsiItemWithSimilarity +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.searchEverywhereMl.ranking.ext.SearchEverywhereElementKeyProvider internal class PsiItemWithSimilarityElementKeyProvider : SearchEverywhereElementKeyProvider { diff --git a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/RunConfigurationsKeyProvider.kt b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/RunConfigurationsKeyProvider.kt index 8ff0ad9e53bc..1300c3cc2d9e 100644 --- a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/RunConfigurationsKeyProvider.kt +++ b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/RunConfigurationsKeyProvider.kt @@ -1,6 +1,9 @@ +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.core.id import com.intellij.execution.actions.ChooseRunConfigurationPopup +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.searchEverywhereMl.ranking.ext.SearchEverywhereElementKeyProvider private class RunConfigurationsKeyProvider: SearchEverywhereElementKeyProvider { diff --git a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/SearchEverywhereMlOrderedItemIdProvider.kt b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/SearchEverywhereMlOrderedItemIdProvider.kt index 2d67351ee2f1..1ee5a99af9d2 100644 --- a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/SearchEverywhereMlOrderedItemIdProvider.kt +++ b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/SearchEverywhereMlOrderedItemIdProvider.kt @@ -1,5 +1,6 @@ package com.intellij.searchEverywhereMl.ranking.core.id +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.searchEverywhereMl.ranking.ext.SearchEverywhereElementKeyProvider import com.intellij.util.concurrency.annotations.RequiresReadLock import java.util.concurrent.atomic.AtomicInteger @@ -14,6 +15,7 @@ internal interface SearchEverywhereMlItemIdProvider { * If the key cannot be computed (due to unsupported element by any of the [SearchEverywhereElementKeyProvider] the id will be null. * @param onNullKey function executed when no key was computed for element. The element, for which there is no key, is passed as a parameter. */ +@OptIn(IntellijInternalApi::class) internal class SearchEverywhereMlOrderedItemIdProvider(private val onNullKey: (element: Any) -> Unit = {}) : SearchEverywhereMlItemIdProvider { private var idCounter = AtomicInteger(1) private val itemToId = hashMapOf() diff --git a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/TextKeyProvider.kt b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/TextKeyProvider.kt index 221b889f7513..3ef7601249c5 100644 --- a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/TextKeyProvider.kt +++ b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/TextKeyProvider.kt @@ -1,6 +1,9 @@ +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.core.id import com.intellij.find.impl.SearchEverywhereItem +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.searchEverywhereMl.ranking.ext.SearchEverywhereElementKeyProvider internal class TextKeyProvider : SearchEverywhereElementKeyProvider { diff --git a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/TypoKeyProvider.kt b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/TypoKeyProvider.kt index 78f6dbb29680..49a52f5ffb05 100644 --- a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/TypoKeyProvider.kt +++ b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/id/TypoKeyProvider.kt @@ -1,6 +1,9 @@ +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.core.id import com.intellij.ide.actions.searcheverywhere.SearchEverywhereSpellCheckResult +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.searchEverywhereMl.ranking.ext.SearchEverywhereElementKeyProvider private class TypoKeyProvider : SearchEverywhereElementKeyProvider { diff --git a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/model/SearchEverywhereMlModel.kt b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/model/SearchEverywhereMlModel.kt index 29516ad61b39..8ca1123ee024 100644 --- a/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/model/SearchEverywhereMlModel.kt +++ b/plugins/search-everywhere-ml/ranking/core/src/com/intellij/searchEverywhereMl/ranking/core/model/SearchEverywhereMlModel.kt @@ -1,3 +1,5 @@ +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.core.model import com.intellij.internal.ml.DecisionFunction @@ -7,6 +9,7 @@ import com.intellij.internal.ml.catboost.CatBoostModelMetadataReader import com.intellij.internal.ml.catboost.CatBoostResourcesModelMetadataReader import com.intellij.internal.ml.catboost.NaiveCatBoostModel import com.intellij.internal.ml.models.local.LocalCatBoostModelMetadataReader +import com.intellij.openapi.util.IntellijInternalApi import org.jetbrains.annotations.NonNls internal abstract class SearchEverywhereMlModel(private val featuresInfo: FeaturesInfo) : DecisionFunction { diff --git a/plugins/search-everywhere-ml/ranking/core/test/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereFileRankingModelTest.kt b/plugins/search-everywhere-ml/ranking/core/test/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereFileRankingModelTest.kt index ebf305784ebe..2788ce4bc17c 100644 --- a/plugins/search-everywhere-ml/ranking/core/test/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereFileRankingModelTest.kt +++ b/plugins/search-everywhere-ml/ranking/core/test/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereFileRankingModelTest.kt @@ -1,8 +1,11 @@ +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.core import com.intellij.ide.actions.GotoFileItemProvider import com.intellij.ide.actions.searcheverywhere.FoundItemDescriptor import com.intellij.ide.util.gotoByName.GotoFileModel +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.openapi.vfs.VirtualFile import com.intellij.psi.PsiFileSystemItem import com.intellij.searchEverywhereMl.SearchEverywhereTabWithMlRanking diff --git a/plugins/search-everywhere-ml/ranking/core/test/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereMlStatisticsCollectorTest.kt b/plugins/search-everywhere-ml/ranking/core/test/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereMlStatisticsCollectorTest.kt index e57ad987964b..27d281d7ac72 100644 --- a/plugins/search-everywhere-ml/ranking/core/test/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereMlStatisticsCollectorTest.kt +++ b/plugins/search-everywhere-ml/ranking/core/test/com/intellij/searchEverywhereMl/ranking/core/SearchEverywhereMlStatisticsCollectorTest.kt @@ -1,6 +1,9 @@ +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.core import com.intellij.ide.actions.searcheverywhere.SearchRestartReason +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.searchEverywhereMl.ranking.core.SearchEverywhereMLStatisticsCollector.REBUILD_REASON_KEY import com.intellij.searchEverywhereMl.ranking.core.SearchEverywhereMLStatisticsCollector.SEARCH_RESTARTED import com.intellij.searchEverywhereMl.ranking.core.SearchEverywhereMLStatisticsCollector.SESSION_FINISHED diff --git a/plugins/search-everywhere-ml/ranking/vcs/src/com/intellij/searchEverywhereMl/ranking/vcs/SearchEverywhereVcsElementKeyProvider.kt b/plugins/search-everywhere-ml/ranking/vcs/src/com/intellij/searchEverywhereMl/ranking/vcs/SearchEverywhereVcsElementKeyProvider.kt index c92249c1c4e7..f1a63685e4a1 100644 --- a/plugins/search-everywhere-ml/ranking/vcs/src/com/intellij/searchEverywhereMl/ranking/vcs/SearchEverywhereVcsElementKeyProvider.kt +++ b/plugins/search-everywhere-ml/ranking/vcs/src/com/intellij/searchEverywhereMl/ranking/vcs/SearchEverywhereVcsElementKeyProvider.kt @@ -1,5 +1,8 @@ +@file:OptIn(IntellijInternalApi::class) + package com.intellij.searchEverywhereMl.ranking.vcs +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.searchEverywhereMl.ranking.ext.SearchEverywhereElementKeyProvider import com.intellij.vcs.log.impl.TimedVcsCommitImpl import com.intellij.vcs.log.impl.VcsRefImpl diff --git a/python/pydevSrc/src/com/jetbrains/python/debugger/pydev/TableCommand.kt b/python/pydevSrc/src/com/jetbrains/python/debugger/pydev/TableCommand.kt index 66caac7aa704..702b78812f32 100644 --- a/python/pydevSrc/src/com/jetbrains/python/debugger/pydev/TableCommand.kt +++ b/python/pydevSrc/src/com/jetbrains/python/debugger/pydev/TableCommand.kt @@ -1,6 +1,9 @@ -// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package com.jetbrains.python.debugger.pydev +import com.intellij.openapi.util.IntellijInternalApi import com.intellij.util.asSafely import com.jetbrains.python.debugger.pydev.tables.PyDevCommandParameters import com.jetbrains.python.tables.TableCommandParameters diff --git a/python/pydevSrc/src/com/jetbrains/python/debugger/pydev/tables/PyDevCommandParameters.kt b/python/pydevSrc/src/com/jetbrains/python/debugger/pydev/tables/PyDevCommandParameters.kt index 9cbab97a4fd5..74d5b591acb2 100644 --- a/python/pydevSrc/src/com/jetbrains/python/debugger/pydev/tables/PyDevCommandParameters.kt +++ b/python/pydevSrc/src/com/jetbrains/python/debugger/pydev/tables/PyDevCommandParameters.kt @@ -1,6 +1,9 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +@file:OptIn(IntellijInternalApi::class) + package com.jetbrains.python.debugger.pydev.tables +import com.intellij.openapi.util.IntellijInternalApi import com.jetbrains.python.tables.TableCommandParameters class PyDevCommandParameters(val start: Int, val end: Int, val format: String?) : TableCommandParameters