diff --git a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/AnnotationUsedAsAnnotationArgumentFixFactories.kt b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/AnnotationUsedAsAnnotationArgumentFixFactories.kt deleted file mode 100644 index d7951fd6d5db..000000000000 --- a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/AnnotationUsedAsAnnotationArgumentFixFactories.kt +++ /dev/null @@ -1,13 +0,0 @@ -// 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.k2.codeinsight.fixes - -import org.jetbrains.kotlin.analysis.api.fir.diagnostics.KaFirDiagnostic -import org.jetbrains.kotlin.idea.codeinsight.api.applicators.fixes.KotlinQuickFixFactory -import org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument - -internal object AnnotationUsedAsAnnotationArgumentFixFactories { - - val removeAtFromAnnotationArgumentFixFactory = KotlinQuickFixFactory.ModCommandBased { diagnostic: KaFirDiagnostic.AnnotationUsedAsAnnotationArgument -> - listOf(RemoveAtFromAnnotationArgument(diagnostic.psi)) - } -} diff --git a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/KotlinK2QuickFixRegistrar.kt b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/KotlinK2QuickFixRegistrar.kt index 077e4c34d2f0..0f4c5e343bc8 100644 --- a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/KotlinK2QuickFixRegistrar.kt +++ b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/KotlinK2QuickFixRegistrar.kt @@ -364,8 +364,6 @@ class KotlinK2QuickFixRegistrar : KotlinQuickFixRegistrar() { registerFactory(ReplaceProtectedToPublishedApiCallFixFactory.protectedCallFromPublicInline) registerFactory(ReplaceProtectedToPublishedApiCallFixFactory.protectedCallFromPublicInlineError) - - registerFactory(AnnotationUsedAsAnnotationArgumentFixFactories.removeAtFromAnnotationArgumentFixFactory) } private val whenStatements = KtQuickFixesListBuilder.registerPsiQuickFix { diff --git a/plugins/kotlin/code-insight/fixes-k2/tests/test/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/HighLevelQuickFixTestGenerated.java b/plugins/kotlin/code-insight/fixes-k2/tests/test/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/HighLevelQuickFixTestGenerated.java index c885f319d108..3b5cbb9bbba8 100644 --- a/plugins/kotlin/code-insight/fixes-k2/tests/test/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/HighLevelQuickFixTestGenerated.java +++ b/plugins/kotlin/code-insight/fixes-k2/tests/test/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/HighLevelQuickFixTestGenerated.java @@ -10742,39 +10742,7 @@ public abstract class HighLevelQuickFixTestGenerated extends AbstractHighLevelQu } } - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../../idea/tests/testData/quickfix/removeAtFromAnnotationArgument") - public static class RemoveAtFromAnnotationArgument extends AbstractHighLevelQuickFixTest { - @java.lang.Override - @org.jetbrains.annotations.NotNull - public final KotlinPluginMode getPluginMode() { - return KotlinPluginMode.K2; - } - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("arrayParam.kt") - public void testArrayParam() throws Exception { - runTest("../../../idea/tests/testData/quickfix/removeAtFromAnnotationArgument/arrayParam.kt"); - } - - @TestMetadata("brokenCode.kt") - public void testBrokenCode() throws Exception { - runTest("../../../idea/tests/testData/quickfix/removeAtFromAnnotationArgument/brokenCode.kt"); - } - - @TestMetadata("namedParam.kt") - public void testNamedParam() throws Exception { - runTest("../../../idea/tests/testData/quickfix/removeAtFromAnnotationArgument/namedParam.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("../../../idea/tests/testData/quickfix/removeAtFromAnnotationArgument/simple.kt"); - } - } @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("../../../idea/tests/testData/quickfix/removeDefaultParameterValue") diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/arrayParam.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/arrayParam.kt index 9d7735dcd168..96839cc07993 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/arrayParam.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/arrayParam.kt @@ -7,7 +7,4 @@ annotation class X(val value: Array) @X(arrayOf(Y(), @Y())) fun foo() { } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument -/* IGNORE_K2 */ -// KT-72831 -// KTIJ-31896 \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/arrayParam.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/arrayParam.kt.after index ad5eb322482d..613ddb18ef70 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/arrayParam.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/arrayParam.kt.after @@ -7,7 +7,4 @@ annotation class X(val value: Array) @X(arrayOf(Y(), Y())) fun foo() { } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument -/* IGNORE_K2 */ -// KT-72831 -// KTIJ-31896 \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/brokenCode.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/brokenCode.kt index 410838c0f2cb..3aaf8e0365e8 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/brokenCode.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/brokenCode.kt @@ -2,7 +2,4 @@ // DISABLE-ERRORS @Suppress({ @x y() }) fun test() {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument -/* IGNORE_K2 */ -// KT-72831 -// KTIJ-31896 \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/brokenCode.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/brokenCode.kt.after index 78d5c176ec5a..f813d9a2b18e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/brokenCode.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/brokenCode.kt.after @@ -2,7 +2,4 @@ // DISABLE-ERRORS @Suppress({ x y() }) fun test() {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument -/* IGNORE_K2 */ -// KT-72831 -// KTIJ-31896 \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/namedParam.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/namedParam.kt index 27f30e34d9f0..d5e6ad368420 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/namedParam.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/namedParam.kt @@ -7,5 +7,4 @@ annotation class X(val value: Y, val y: Y) fun foo() { } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument -// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/namedParam.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/namedParam.kt.after index e901a89c8fa8..7bef552dfad3 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/namedParam.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/namedParam.kt.after @@ -7,5 +7,4 @@ annotation class X(val value: Y, val y: Y) fun foo() { } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument -// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/simple.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/simple.kt index 4b85e74a0ae7..4b26182284c7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/simple.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/simple.kt @@ -6,5 +6,4 @@ annotation class X(val value: Y) @X(@Y()) fun foo() { } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument -// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/simple.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/simple.kt.after index c2c4caf900ed..e9cba6399b9d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/simple.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeAtFromAnnotationArgument/simple.kt.after @@ -6,5 +6,4 @@ annotation class X(val value: Y) @X(Y()) fun foo() { } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument -// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument \ No newline at end of file diff --git a/plugins/kotlin/util/test-generator-fir/test/org/jetbrains/kotlin/fir/testGenerator/codeinsight/GenerateK2QuickFixTests.kt b/plugins/kotlin/util/test-generator-fir/test/org/jetbrains/kotlin/fir/testGenerator/codeinsight/GenerateK2QuickFixTests.kt index 8e905cd3cb95..19d962ae2990 100644 --- a/plugins/kotlin/util/test-generator-fir/test/org/jetbrains/kotlin/fir/testGenerator/codeinsight/GenerateK2QuickFixTests.kt +++ b/plugins/kotlin/util/test-generator-fir/test/org/jetbrains/kotlin/fir/testGenerator/codeinsight/GenerateK2QuickFixTests.kt @@ -167,7 +167,7 @@ internal fun MutableTWorkspace.generateK2FixTests() { model("$idea/quickfix/redundantVisibilityModifier", pattern = pattern, isIgnored = true) model("$idea/quickfix/removeAnnotation", pattern = pattern, isIgnored = true) model("$idea/quickfix/removeArgument", pattern = pattern) - model("$idea/quickfix/removeAtFromAnnotationArgument", pattern = pattern) + model("$idea/quickfix/removeAtFromAnnotationArgument", pattern = pattern, isIgnored = true) model("$idea/quickfix/removeDefaultParameterValue", pattern = pattern) model("$idea/quickfix/removeFinalUpperBound", pattern = pattern) model("$idea/quickfix/removeNoConstructor", pattern = pattern)