From 39209628799dff968ac10ff362189509583c3658 Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Wed, 26 Jun 2024 09:13:22 +0200 Subject: [PATCH] [kotlin] ensure that the class can't be loaded by the child loader - required if inspection is called before intentions are loaded (= open project without opening any kotlin files, run inspections) ^KTIJ-30415 fixed GitOrigin-RevId: fcd0bebe8e68ed0d497d6e08f12c0923f49fbc13 --- .../ReplaceItWithExplicitFunctionLiteralParamIntention.kt | 2 +- .../NestedLambdaShadowedImplicitParameterInspection.kt | 2 +- .../replaceItWithExplicitFunctionLiteralParam/.intention | 2 +- .../replaceItWithExplicitFunctionLiteralParam/.k2Intention | 2 +- plugins/kotlin/plugin/common/resources/META-INF/kotlin-core.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename plugins/kotlin/code-insight/intentions-shared/src/org/jetbrains/kotlin/idea/codeInsight/intentions/{shared => fake}/ReplaceItWithExplicitFunctionLiteralParamIntention.kt (96%) diff --git a/plugins/kotlin/code-insight/intentions-shared/src/org/jetbrains/kotlin/idea/codeInsight/intentions/shared/ReplaceItWithExplicitFunctionLiteralParamIntention.kt b/plugins/kotlin/code-insight/intentions-shared/src/org/jetbrains/kotlin/idea/codeInsight/intentions/fake/ReplaceItWithExplicitFunctionLiteralParamIntention.kt similarity index 96% rename from plugins/kotlin/code-insight/intentions-shared/src/org/jetbrains/kotlin/idea/codeInsight/intentions/shared/ReplaceItWithExplicitFunctionLiteralParamIntention.kt rename to plugins/kotlin/code-insight/intentions-shared/src/org/jetbrains/kotlin/idea/codeInsight/intentions/fake/ReplaceItWithExplicitFunctionLiteralParamIntention.kt index de92079c9a4a..122054fe1282 100644 --- a/plugins/kotlin/code-insight/intentions-shared/src/org/jetbrains/kotlin/idea/codeInsight/intentions/shared/ReplaceItWithExplicitFunctionLiteralParamIntention.kt +++ b/plugins/kotlin/code-insight/intentions-shared/src/org/jetbrains/kotlin/idea/codeInsight/intentions/fake/ReplaceItWithExplicitFunctionLiteralParamIntention.kt @@ -1,5 +1,5 @@ // Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -package org.jetbrains.kotlin.idea.codeInsight.intentions.shared +package org.jetbrains.kotlin.idea.codeInsight.intentions.fake import com.intellij.codeInsight.FileModificationService import com.intellij.openapi.actionSystem.CommonDataKeys diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/inspections/NestedLambdaShadowedImplicitParameterInspection.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/inspections/NestedLambdaShadowedImplicitParameterInspection.kt index 3f80a7da626e..e0f5f343b691 100644 --- a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/inspections/NestedLambdaShadowedImplicitParameterInspection.kt +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/inspections/NestedLambdaShadowedImplicitParameterInspection.kt @@ -14,7 +14,7 @@ import org.jetbrains.kotlin.idea.caches.resolve.safeAnalyzeNonSourceRootCode import org.jetbrains.kotlin.idea.codeinsight.api.classic.inspections.AbstractKotlinInspection import org.jetbrains.kotlin.idea.codeinsight.utils.findExistingEditor import org.jetbrains.kotlin.idea.inspections.collections.isCalling -import org.jetbrains.kotlin.idea.codeInsight.intentions.shared.ReplaceItWithExplicitFunctionLiteralParamIntention +import org.jetbrains.kotlin.idea.codeInsight.intentions.fake.ReplaceItWithExplicitFunctionLiteralParamIntention import org.jetbrains.kotlin.idea.intentions.callExpression import org.jetbrains.kotlin.idea.refactoring.rename.KotlinVariableInplaceRenameHandler import org.jetbrains.kotlin.name.FqName diff --git a/plugins/kotlin/idea/tests/testData/intentions/replaceItWithExplicitFunctionLiteralParam/.intention b/plugins/kotlin/idea/tests/testData/intentions/replaceItWithExplicitFunctionLiteralParam/.intention index d4287e2e201e..cfe95983a4b7 100644 --- a/plugins/kotlin/idea/tests/testData/intentions/replaceItWithExplicitFunctionLiteralParam/.intention +++ b/plugins/kotlin/idea/tests/testData/intentions/replaceItWithExplicitFunctionLiteralParam/.intention @@ -1 +1 @@ -org.jetbrains.kotlin.idea.codeInsight.intentions.shared.ReplaceItWithExplicitFunctionLiteralParamIntention +org.jetbrains.kotlin.idea.codeInsight.intentions.fake.ReplaceItWithExplicitFunctionLiteralParamIntention diff --git a/plugins/kotlin/idea/tests/testData/intentions/replaceItWithExplicitFunctionLiteralParam/.k2Intention b/plugins/kotlin/idea/tests/testData/intentions/replaceItWithExplicitFunctionLiteralParam/.k2Intention index d4287e2e201e..cfe95983a4b7 100644 --- a/plugins/kotlin/idea/tests/testData/intentions/replaceItWithExplicitFunctionLiteralParam/.k2Intention +++ b/plugins/kotlin/idea/tests/testData/intentions/replaceItWithExplicitFunctionLiteralParam/.k2Intention @@ -1 +1 @@ -org.jetbrains.kotlin.idea.codeInsight.intentions.shared.ReplaceItWithExplicitFunctionLiteralParamIntention +org.jetbrains.kotlin.idea.codeInsight.intentions.fake.ReplaceItWithExplicitFunctionLiteralParamIntention diff --git a/plugins/kotlin/plugin/common/resources/META-INF/kotlin-core.xml b/plugins/kotlin/plugin/common/resources/META-INF/kotlin-core.xml index 40fd21b66324..b8080b4d5dc5 100644 --- a/plugins/kotlin/plugin/common/resources/META-INF/kotlin-core.xml +++ b/plugins/kotlin/plugin/common/resources/META-INF/kotlin-core.xml @@ -541,7 +541,7 @@ kotlin - org.jetbrains.kotlin.idea.codeInsight.intentions.shared.ReplaceItWithExplicitFunctionLiteralParamIntention + org.jetbrains.kotlin.idea.codeInsight.intentions.fake.ReplaceItWithExplicitFunctionLiteralParamIntention messages.KotlinBundle group.names.kotlin