Revert "[kotlin] Move RemoveAtFromAnnotationArgument to frontend independent module"

This reverts commit e409bfb1e805f755cdc9ddbd01e28dea3ecdde60.

GitOrigin-RevId: 3ff05a6bf938d9a4b86ecf6a1dc83b1601739d0b
This commit is contained in:
Andrey Cherkasov
2024-11-05 21:27:44 +00:00
committed by intellij-monorepo-bot
parent 07acb58395
commit 210874396e
12 changed files with 9 additions and 72 deletions
@@ -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))
}
}
@@ -364,8 +364,6 @@ class KotlinK2QuickFixRegistrar : KotlinQuickFixRegistrar() {
registerFactory(ReplaceProtectedToPublishedApiCallFixFactory.protectedCallFromPublicInline)
registerFactory(ReplaceProtectedToPublishedApiCallFixFactory.protectedCallFromPublicInlineError)
registerFactory(AnnotationUsedAsAnnotationArgumentFixFactories.removeAtFromAnnotationArgumentFixFactory)
}
private val whenStatements = KtQuickFixesListBuilder.registerPsiQuickFix {
@@ -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")
@@ -7,7 +7,4 @@ annotation class X(val value: Array<Y>)
@X(arrayOf(Y(), @Y()<caret>))
fun foo() {
}
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument
/* IGNORE_K2 */
// KT-72831
// KTIJ-31896
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument
@@ -7,7 +7,4 @@ annotation class X(val value: Array<Y>)
@X(arrayOf(Y(), Y()))
fun foo() {
}
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument
/* IGNORE_K2 */
// KT-72831
// KTIJ-31896
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument
@@ -2,7 +2,4 @@
// DISABLE-ERRORS
@Suppress({ <caret>@x
y() }) fun test() {}
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument
/* IGNORE_K2 */
// KT-72831
// KTIJ-31896
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument
@@ -2,7 +2,4 @@
// DISABLE-ERRORS
@Suppress({ <caret>x
y() }) fun test() {}
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument
/* IGNORE_K2 */
// KT-72831
// KTIJ-31896
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument
@@ -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
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument
@@ -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
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument
@@ -6,5 +6,4 @@ annotation class X(val value: Y)
@X(@Y()<caret>)
fun foo() {
}
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument
@@ -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
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveAtFromAnnotationArgument
@@ -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)