diff --git a/plugins/kotlin/frontend-independent/src/org/jetbrains/kotlin/idea/quickfix/RestrictedRetentionForExpressionAnnotationUtils.kt b/plugins/kotlin/frontend-independent/src/org/jetbrains/kotlin/idea/quickfix/RestrictedRetentionForExpressionAnnotationUtils.kt new file mode 100644 index 000000000000..43441eb50997 --- /dev/null +++ b/plugins/kotlin/frontend-independent/src/org/jetbrains/kotlin/idea/quickfix/RestrictedRetentionForExpressionAnnotationUtils.kt @@ -0,0 +1,91 @@ +// 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.quickfix + +import com.intellij.modcommand.ActionContext +import com.intellij.modcommand.ModPsiUpdater +import com.intellij.modcommand.PsiUpdateModCommandAction +import org.jetbrains.kotlin.builtins.StandardNames +import org.jetbrains.kotlin.descriptors.annotations.KotlinTarget +import org.jetbrains.kotlin.idea.base.codeInsight.ShortenReferencesFacility +import org.jetbrains.kotlin.idea.base.resources.KotlinBundle +import org.jetbrains.kotlin.psi.* + +private val sourceRetention = "${StandardNames.FqNames.annotationRetention.asString()}.${AnnotationRetention.SOURCE.name}" +private val sourceRetentionAnnotation = "@${StandardNames.FqNames.retention.asString()}($sourceRetention)" + +class AddSourceRetentionFix( + element: KtClass, +) : PsiUpdateModCommandAction(element) { + + override fun getFamilyName(): String = KotlinBundle.message("add.source.retention") + + override fun invoke( + context: ActionContext, + element: KtClass, + updater: ModPsiUpdater, + ) { + val added = element.addAnnotationEntry(KtPsiFactory(context.project).createAnnotationEntry(sourceRetentionAnnotation)) + ShortenReferencesFacility.getInstance().shorten(added) + } +} + +class ChangeRetentionToSourceFix( + element: KtAnnotationEntry, +) : PsiUpdateModCommandAction(element) { + + override fun getFamilyName(): String = KotlinBundle.message("change.existent.retention.to.source") + + override fun invoke( + context: ActionContext, + element: KtAnnotationEntry, + updater: ModPsiUpdater, + ) { + val psiFactory = KtPsiFactory(context.project) + val added = if (element.valueArgumentList == null) { + element.add(psiFactory.createCallArguments("($sourceRetention)")) as KtValueArgumentList + } else { + if (element.valueArguments.isNotEmpty()) { + element.valueArgumentList?.removeArgument(0) + } + element.valueArgumentList?.addArgument(psiFactory.createArgument(sourceRetention)) + } + if (added != null) { + ShortenReferencesFacility.getInstance().shorten(added) + } + } +} + +class RemoveExpressionTargetFix( + element: KtValueArgument, +) : PsiUpdateModCommandAction(element) { + + override fun getFamilyName(): String = KotlinBundle.message("remove.expression.target") + + override fun invoke( + context: ActionContext, + element: KtValueArgument, + updater: ModPsiUpdater, + ) { + val argumentList = element.parent as? KtValueArgumentList ?: return + if (argumentList.arguments.size == 1) { + val annotation = argumentList.parent as? KtAnnotationEntry ?: return + annotation.delete() + } else { + argumentList.removeArgument(element) + } + } +} + +fun findExpressionTargetArgument(targetAnnotation: KtAnnotationEntry): KtValueArgument? { + val valueArgumentList = targetAnnotation.valueArgumentList ?: return null + if (targetAnnotation.lambdaArguments.isNotEmpty()) return null + + for (valueArgument in valueArgumentList.arguments) { + val argumentExpression = valueArgument.getArgumentExpression() ?: continue + if (argumentExpression.text.contains(KotlinTarget.EXPRESSION.toString())) { + return valueArgument + } + } + + return null +} diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/quickfix/RestrictedRetentionForExpressionAnnotationFactory.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/quickfix/RestrictedRetentionForExpressionAnnotationFactory.kt index 6f564cef959c..1e1d6ac2877d 100644 --- a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/quickfix/RestrictedRetentionForExpressionAnnotationFactory.kt +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/quickfix/RestrictedRetentionForExpressionAnnotationFactory.kt @@ -3,26 +3,18 @@ package org.jetbrains.kotlin.idea.quickfix import com.intellij.codeInsight.intention.IntentionAction -import com.intellij.modcommand.ActionContext -import com.intellij.modcommand.ModPsiUpdater -import com.intellij.modcommand.PsiUpdateModCommandAction import org.jetbrains.kotlin.builtins.StandardNames -import org.jetbrains.kotlin.descriptors.annotations.KotlinTarget import org.jetbrains.kotlin.diagnostics.Diagnostic -import org.jetbrains.kotlin.idea.base.codeInsight.ShortenReferencesFacility -import org.jetbrains.kotlin.idea.base.resources.KotlinBundle import org.jetbrains.kotlin.idea.caches.resolve.analyze import org.jetbrains.kotlin.name.FqName -import org.jetbrains.kotlin.psi.* +import org.jetbrains.kotlin.psi.KtAnnotationEntry +import org.jetbrains.kotlin.psi.KtClass import org.jetbrains.kotlin.psi.psiUtil.containingClass import org.jetbrains.kotlin.resolve.BindingContext import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe object RestrictedRetentionForExpressionAnnotationFactory : KotlinIntentionActionsFactory() { - private val sourceRetention = "${StandardNames.FqNames.annotationRetention.asString()}.${AnnotationRetention.SOURCE.name}" - private val sourceRetentionAnnotation = "@${StandardNames.FqNames.retention.asString()}($sourceRetention)" - override fun doCreateActions(diagnostic: Diagnostic): List { val annotationEntry = diagnostic.psiElement as? KtAnnotationEntry ?: return emptyList() val containingClass = annotationEntry.containingClass() ?: return emptyList() @@ -46,82 +38,4 @@ object RestrictedRetentionForExpressionAnnotationFactory : KotlinIntentionAction && analyze()[BindingContext.TYPE, it.typeReference]?.constructor?.declarationDescriptor?.fqNameSafe == fqName } } - - private fun findExpressionTargetArgument(targetAnnotation: KtAnnotationEntry): KtValueArgument? { - val valueArgumentList = targetAnnotation.valueArgumentList ?: return null - if (targetAnnotation.lambdaArguments.isNotEmpty()) return null - - for (valueArgument in valueArgumentList.arguments) { - val argumentExpression = valueArgument.getArgumentExpression() ?: continue - if (argumentExpression.text.contains(KotlinTarget.EXPRESSION.toString())) { - return valueArgument - } - } - - return null - } - - private class AddSourceRetentionFix( - element: KtClass, - ) : PsiUpdateModCommandAction(element) { - - override fun getFamilyName(): String = KotlinBundle.message("add.source.retention") - - override fun invoke( - context: ActionContext, - element: KtClass, - updater: ModPsiUpdater, - ) { - val added = element.addAnnotationEntry(KtPsiFactory(context.project).createAnnotationEntry(sourceRetentionAnnotation)) - ShortenReferencesFacility.getInstance().shorten(added) - } - } - - private class ChangeRetentionToSourceFix( - element: KtAnnotationEntry - ) : PsiUpdateModCommandAction(element) { - - override fun getFamilyName(): String = KotlinBundle.message("change.existent.retention.to.source") - - override fun invoke( - context: ActionContext, - element: KtAnnotationEntry, - updater: ModPsiUpdater, - ) { - val psiFactory = KtPsiFactory(context.project) - val added = if (element.valueArgumentList == null) { - element.add(psiFactory.createCallArguments("($sourceRetention)")) as KtValueArgumentList - } else { - if (element.valueArguments.isNotEmpty()) { - element.valueArgumentList?.removeArgument(0) - } - element.valueArgumentList?.addArgument(psiFactory.createArgument(sourceRetention)) - } - if (added != null) { - ShortenReferencesFacility.getInstance().shorten(added) - } - } - } - - private class RemoveExpressionTargetFix( - element: KtValueArgument, - ) : PsiUpdateModCommandAction(element) { - - override fun getFamilyName(): String = KotlinBundle.message("remove.expression.target") - - override fun invoke( - context: ActionContext, - element: KtValueArgument, - updater: ModPsiUpdater, - ) { - val argumentList = element.parent as? KtValueArgumentList ?: return - - if (argumentList.arguments.size == 1) { - val annotation = argumentList.parent as? KtAnnotationEntry ?: return - annotation.delete() - } else { - argumentList.removeArgument(element) - } - } - } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention.kt b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention.kt index 055dfc228222..0353f2c61291 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention.kt @@ -1,4 +1,4 @@ // "Add SOURCE retention" "true" @Target(AnnotationTarget.EXPRESSION) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$AddSourceRetentionFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.AddSourceRetentionFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention.kt.after index 72dfc74362df..3c061ff8f81f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention.kt.after @@ -2,4 +2,4 @@ @Retention(AnnotationRetention.SOURCE) @Target(AnnotationTarget.EXPRESSION) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$AddSourceRetentionFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.AddSourceRetentionFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention2.kt b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention2.kt index 71321fcc2abb..eb1be8551e89 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention2.kt @@ -4,4 +4,4 @@ annotation class Retention @Retention @Target(AnnotationTarget.EXPRESSION) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$AddSourceRetentionFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.AddSourceRetentionFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention2.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention2.kt.after index b307a69baaa1..31e2cbfc29e9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention2.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention2.kt.after @@ -5,4 +5,4 @@ annotation class Retention @Retention @Target(AnnotationTarget.EXPRESSION) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$AddSourceRetentionFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.AddSourceRetentionFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/binaryRetention.kt b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/binaryRetention.kt index d71aac71fc38..02e1039848d9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/binaryRetention.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/binaryRetention.kt @@ -2,4 +2,4 @@ @Retention(AnnotationRetention.BINARY) @Target(AnnotationTarget.EXPRESSION) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$ChangeRetentionToSourceFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/binaryRetention.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/binaryRetention.kt.after index b8e389226e86..758c641d47a4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/binaryRetention.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/binaryRetention.kt.after @@ -2,4 +2,4 @@ @Retention(AnnotationRetention.SOURCE) @Target(AnnotationTarget.EXPRESSION) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$ChangeRetentionToSourceFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention.kt b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention.kt index 702a8c5f389a..ded37b8d8196 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention.kt @@ -2,4 +2,4 @@ @Retention @Target(AnnotationTarget.EXPRESSION) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$ChangeRetentionToSourceFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention.kt.after index b8e389226e86..758c641d47a4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention.kt.after @@ -2,4 +2,4 @@ @Retention(AnnotationRetention.SOURCE) @Target(AnnotationTarget.EXPRESSION) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$ChangeRetentionToSourceFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention2.kt b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention2.kt index 33dab9ca5470..eb57cf37bd21 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention2.kt @@ -2,4 +2,4 @@ @Retention() @Target(AnnotationTarget.EXPRESSION) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$ChangeRetentionToSourceFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention2.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention2.kt.after index b8e389226e86..758c641d47a4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention2.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention2.kt.after @@ -2,4 +2,4 @@ @Retention(AnnotationRetention.SOURCE) @Target(AnnotationTarget.EXPRESSION) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$ChangeRetentionToSourceFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention3.kt b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention3.kt index 8a968ac839c5..6c9a209d99fd 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention3.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention3.kt @@ -4,4 +4,4 @@ class AnnotationRetention @Retention() @Target(AnnotationTarget.EXPRESSION) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$ChangeRetentionToSourceFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention3.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention3.kt.after index f24eff323b86..344b187259f1 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention3.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention3.kt.after @@ -6,4 +6,4 @@ class AnnotationRetention @Retention(AnnotationRetention.SOURCE) @Target(AnnotationTarget.EXPRESSION) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$ChangeRetentionToSourceFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/binaryRetention.kt b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/binaryRetention.kt index 49dc9d2af65b..4182742beb5b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/binaryRetention.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/binaryRetention.kt @@ -2,4 +2,4 @@ @Retention(AnnotationRetention.BINARY) @Target(AnnotationTarget.EXPRESSION) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$RemoveExpressionTargetFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/binaryRetention.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/binaryRetention.kt.after index ead29c7f1297..a8d08d49619c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/binaryRetention.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/binaryRetention.kt.after @@ -1,4 +1,4 @@ // "Remove EXPRESSION target" "true" @Retention(AnnotationRetention.BINARY) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$RemoveExpressionTargetFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention.kt b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention.kt index b6e88a14984c..9035637db18d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention.kt @@ -2,4 +2,4 @@ @Retention @Target(AnnotationTarget.EXPRESSION) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$RemoveExpressionTargetFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention.kt.after index dd65fe9fb133..86825bc469b5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention.kt.after @@ -1,4 +1,4 @@ // "Remove EXPRESSION target" "true" @Retention annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$RemoveExpressionTargetFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention2.kt b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention2.kt index 05a5a7ac24f3..d2043f52d589 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention2.kt @@ -2,4 +2,4 @@ @Retention() @Target(AnnotationTarget.EXPRESSION) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$RemoveExpressionTargetFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention2.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention2.kt.after index ccb55fc3b7d5..2cfc7ea3c4e7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention2.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention2.kt.after @@ -1,4 +1,4 @@ // "Remove EXPRESSION target" "true" @Retention() annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$RemoveExpressionTargetFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargets.kt b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargets.kt index f596f6aae2eb..749ae0c9ee8e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargets.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargets.kt @@ -4,4 +4,4 @@ import kotlin.annotation.AnnotationTarget.* @Retention @Target(FIELD, EXPRESSION, PROPERTY) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$RemoveExpressionTargetFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargets.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargets.kt.after index 55c5bb8e72ae..3c63e0e3752c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargets.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargets.kt.after @@ -4,4 +4,4 @@ import kotlin.annotation.AnnotationTarget.* @Retention @Target(FIELD, PROPERTY) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$RemoveExpressionTargetFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargetsImported.kt b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargetsImported.kt index 27ed31212f1b..d76775697c4e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargetsImported.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargetsImported.kt @@ -2,4 +2,4 @@ @Retention @Target(AnnotationTarget.FIELD, AnnotationTarget.EXPRESSION, AnnotationTarget.PROPERTY) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$RemoveExpressionTargetFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargetsImported.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargetsImported.kt.after index 186104e1c631..30ae8229087d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargetsImported.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargetsImported.kt.after @@ -2,4 +2,4 @@ @Retention @Target(AnnotationTarget.FIELD, AnnotationTarget.PROPERTY) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$RemoveExpressionTargetFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/noRetention.kt b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/noRetention.kt index 007be75bfb08..51c164986c7b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/noRetention.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/noRetention.kt @@ -1,4 +1,4 @@ // "Remove EXPRESSION target" "true" @Target(AnnotationTarget.EXPRESSION) annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$RemoveExpressionTargetFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/noRetention.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/noRetention.kt.after index 717fc297b3a4..6d0aa6c3eecc 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/noRetention.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/noRetention.kt.after @@ -1,3 +1,3 @@ // "Remove EXPRESSION target" "true" annotation class Ann -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RestrictedRetentionForExpressionAnnotationFactory$RemoveExpressionTargetFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix \ No newline at end of file