diff --git a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/replaceWith/DeprecatedSymbolUsageFixBase.kt b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/replaceWith/DeprecatedSymbolUsageFixBase.kt index 833cd24ba7f8..04da5f5d0175 100644 --- a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/replaceWith/DeprecatedSymbolUsageFixBase.kt +++ b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/replaceWith/DeprecatedSymbolUsageFixBase.kt @@ -4,9 +4,11 @@ package org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith import com.intellij.codeInsight.intention.HighPriorityAction import com.intellij.codeInsight.intention.IntentionAction +import com.intellij.openapi.diagnostic.ControlFlowException import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.psi.PsiElement +import org.jetbrains.kotlin.analysis.api.KaExperimentalApi import org.jetbrains.kotlin.analysis.api.KaSession import org.jetbrains.kotlin.analysis.api.annotations.* import org.jetbrains.kotlin.analysis.api.base.KaConstantValue @@ -19,9 +21,10 @@ import org.jetbrains.kotlin.idea.codeinsight.api.applicators.fixes.KotlinQuickFi import org.jetbrains.kotlin.idea.codeinsight.api.classic.quickfixes.KotlinPsiOnlyQuickFixAction import org.jetbrains.kotlin.idea.core.moveCaret import org.jetbrains.kotlin.idea.k2.refactoring.inline.codeInliner.CallableUsageReplacementStrategy +import org.jetbrains.kotlin.idea.k2.refactoring.inline.codeInliner.ClassUsageReplacementStrategy import org.jetbrains.kotlin.idea.k2.refactoring.inline.codeInliner.CodeToInlineBuilder -import org.jetbrains.kotlin.idea.k2.refactoring.inline.codeInliner.TypeAliasUsageReplacementStrategy import org.jetbrains.kotlin.idea.quickfix.replaceWith.ReplaceWithData +import org.jetbrains.kotlin.idea.refactoring.inline.codeInliner.CodeToInline import org.jetbrains.kotlin.idea.refactoring.inline.codeInliner.UsageReplacementStrategy import org.jetbrains.kotlin.idea.refactoring.inline.codeInliner.buildCodeToInline import org.jetbrains.kotlin.idea.references.mainReference @@ -30,14 +33,17 @@ import org.jetbrains.kotlin.psi.KtArrayAccessExpression import org.jetbrains.kotlin.psi.KtBinaryExpression import org.jetbrains.kotlin.psi.KtCallExpression import org.jetbrains.kotlin.psi.KtCallableDeclaration +import org.jetbrains.kotlin.psi.KtClassLikeDeclaration import org.jetbrains.kotlin.psi.KtConstructorCalleeExpression +import org.jetbrains.kotlin.psi.KtDeclaration import org.jetbrains.kotlin.psi.KtFile import org.jetbrains.kotlin.psi.KtFunction +import org.jetbrains.kotlin.psi.KtNullableType +import org.jetbrains.kotlin.psi.KtPrimaryConstructor import org.jetbrains.kotlin.psi.KtProperty import org.jetbrains.kotlin.psi.KtPsiFactory import org.jetbrains.kotlin.psi.KtReferenceExpression import org.jetbrains.kotlin.psi.KtSimpleNameExpression -import org.jetbrains.kotlin.psi.KtTypeAlias import org.jetbrains.kotlin.psi.KtTypeReference import org.jetbrains.kotlin.psi.KtUserType import org.jetbrains.kotlin.psi.KtValVarKeywordOwner @@ -65,23 +71,30 @@ object DeprecationFixFactory { } context(KaSession) + @OptIn(KaExperimentalApi::class) private fun createDeprecation( kaSymbol: KaDeclarationSymbol, psi: PsiElement ): List { + val deprecatedSymbol = kaSymbol.takeIf { it.deprecationStatus != null } + ?: (kaSymbol.containingSymbol as? KaDeclarationSymbol)?.takeIf { it.deprecationStatus != null } + ?: return emptyList() val referenceExpression = when (val psiElement = psi) { is KtArrayAccessExpression -> psiElement is KtSimpleNameExpression -> psiElement - is KtTypeReference -> (psiElement.typeElement as? KtUserType)?.referenceExpression + is KtTypeReference -> { + val typeElement = psiElement.typeElement + (((typeElement as? KtNullableType)?.innerType ?: typeElement) as? KtUserType)?.referenceExpression + } is KtConstructorCalleeExpression -> psiElement.constructorReferenceExpression is KtBinaryExpression -> psiElement.operationReference else -> null } ?: return emptyList() val expression = (referenceExpression.parent as? KtCallExpression)?.takeIf { - (kaSymbol as? KaNamedFunctionSymbol)?.isOperator == true && referenceExpression.mainReference.resolve() is KtValVarKeywordOwner + (deprecatedSymbol as? KaNamedFunctionSymbol)?.isOperator == true && referenceExpression.mainReference.resolve() is KtValVarKeywordOwner } ?: referenceExpression - val replaceWithData = - fetchReplaceWithPattern(kaSymbol) ?: return emptyList() + + val replaceWithData = fetchReplaceWithPattern(deprecatedSymbol) ?: return emptyList() return listOf(DeprecatedSymbolUsageFix(expression, replaceWithData)) } @@ -118,8 +131,7 @@ abstract class DeprecatedSymbolUsageFixBase( "${javaClass.name} should not be created on EDT" } isAvailable = buildUsageReplacementStrategy( - element, - replaceWith + element, replaceWith )?.let { it.createReplacer(element) != null } == true } @@ -142,28 +154,47 @@ abstract class DeprecatedSymbolUsageFixBase( val target = element.mainReference.resolve() when (target) { - is KtCallableDeclaration -> { - val context = (if (target is KtFunction) (target.bodyBlockExpression ?: target.bodyExpression - ?: target.valueParameterList?.parameters?.lastOrNull()) else null) - ?: (target as? KtProperty)?.getter ?: (target as? KtProperty)?.setter ?: (target as? KtProperty)?.initializer - ?: target + is KtPrimaryConstructor, is KtClassLikeDeclaration -> { val psiFactory = KtPsiFactory(element.project) - val expression = - psiFactory.createExpressionCodeFragment(replaceWith.pattern, context).getContentElement() ?: return null + val typeReference = try { + psiFactory.createType(replaceWith.pattern) + } catch (e: Exception) { + if (e is ControlFlowException) throw e + val replacement = createReplacement(target as KtDeclaration, element, replaceWith) ?: return null + + return CallableUsageReplacementStrategy(replacement, inlineSetter = false) + } + + val typeElement = typeReference.typeElement as? KtUserType ?: return null + + return ClassUsageReplacementStrategy(typeElement, null, element.project) + } + + is KtCallableDeclaration -> { + val replacement = createReplacement(target, element, replaceWith) ?: return null - val replacement = buildCodeToInline( - target, expression, false, null, CodeToInlineBuilder( - original = target - ) - ) ?: return null return CallableUsageReplacementStrategy(replacement, inlineSetter = false) } - is KtTypeAlias -> { - return TypeAliasUsageReplacementStrategy(target) - } + else -> return null } } + + private fun createReplacement( + target: KtDeclaration, + element: KtReferenceExpression, + replaceWith: ReplaceWithData + ): CodeToInline? { + val context = (if (target is KtFunction) (target.bodyBlockExpression ?: target.bodyExpression + ?: target.valueParameterList?.parameters?.lastOrNull()) else null) + ?: (target as? KtProperty)?.getter ?: (target as? KtProperty)?.setter ?: (target as? KtProperty)?.initializer + ?: target + val psiFactory = KtPsiFactory(element.project) + val expression = + psiFactory.createExpressionCodeFragment(replaceWith.pattern, context).getContentElement() ?: return null + + return buildCodeToInline(target, expression, false, null, CodeToInlineBuilder(original = target)) + } } } 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 6b9db2e11df0..2099f2a2e1fc 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 @@ -7047,6 +7047,235 @@ public abstract class HighLevelQuickFixTestGenerated extends AbstractHighLevelQu } } + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages") + public static class ClassUsages 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("annotation1.kt") + public void testAnnotation1() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation1.kt"); + } + + @TestMetadata("annotation2.kt") + public void testAnnotation2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation2.kt"); + } + + @TestMetadata("annotation3.kt") + public void testAnnotation3() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation3.kt"); + } + + @TestMetadata("annotation4.kt") + public void testAnnotation4() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation4.kt"); + } + + @TestMetadata("annotationKeepNamedArgs.kt") + public void testAnnotationKeepNamedArgs() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationKeepNamedArgs.kt"); + } + + @TestMetadata("annotationWithFileUseSiteTarget1.kt") + public void testAnnotationWithFileUseSiteTarget1() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget1.kt"); + } + + @TestMetadata("annotationWithFileUseSiteTarget2.kt") + public void testAnnotationWithFileUseSiteTarget2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget2.kt"); + } + + @TestMetadata("annotationWithFileUseSiteTarget3.kt") + public void testAnnotationWithFileUseSiteTarget3() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget3.kt"); + } + + @TestMetadata("annotationWithGetUseSiteTarget1.kt") + public void testAnnotationWithGetUseSiteTarget1() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget1.kt"); + } + + @TestMetadata("annotationWithGetUseSiteTarget2.kt") + public void testAnnotationWithGetUseSiteTarget2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget2.kt"); + } + + @TestMetadata("annotationWithGetUseSiteTarget3.kt") + public void testAnnotationWithGetUseSiteTarget3() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget3.kt"); + } + + @TestMetadata("constructorUsage1.kt") + public void testConstructorUsage1() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage1.kt"); + } + + @TestMetadata("constructorUsage2.kt") + public void testConstructorUsage2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage2.kt"); + } + + @TestMetadata("constructorUsage3.kt") + public void testConstructorUsage3() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage3.kt"); + } + + @TestMetadata("constructorUsage4.kt") + public void testConstructorUsage4() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage4.kt"); + } + + @TestMetadata("constructorUsage5.kt") + public void testConstructorUsage5() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage5.kt"); + } + + @TestMetadata("constructorUsage6.kt") + public void testConstructorUsage6() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage6.kt"); + } + + @TestMetadata("constructorUsage7.kt") + public void testConstructorUsage7() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage7.kt"); + } + + @TestMetadata("constructorUsageWithTypeArgument.kt") + public void testConstructorUsageWithTypeArgument() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument.kt"); + } + + @TestMetadata("constructorUsageWithTypeArgument2.kt") + public void testConstructorUsageWithTypeArgument2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument2.kt"); + } + + @TestMetadata("constructorUsageWithTypeArgument3.kt") + public void testConstructorUsageWithTypeArgument3() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument3.kt"); + } + + @TestMetadata("constructorUsageWithTypeArgument4.kt") + public void testConstructorUsageWithTypeArgument4() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument4.kt"); + } + + @TestMetadata("constructorUsageWithTypeArgument5.kt") + public void testConstructorUsageWithTypeArgument5() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument5.kt"); + } + + @TestMetadata("constructorUsageWithTypeArgument6.kt") + public void testConstructorUsageWithTypeArgument6() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument6.kt"); + } + + @TestMetadata("constructorUsageWithTypeArgument7.kt") + public void testConstructorUsageWithTypeArgument7() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument7.kt"); + } + + @TestMetadata("constructorUsageWithTypeArgumentWithoutSpecifyType.kt") + public void testConstructorUsageWithTypeArgumentWithoutSpecifyType() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgumentWithoutSpecifyType.kt"); + } + + @TestMetadata("imports.kt") + public void testImports() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/imports.kt"); + } + + @TestMetadata("inAliasSimple.kt") + public void testInAliasSimple() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasSimple.kt"); + } + + @TestMetadata("inAliasWithOwnReplaceForConstructorForAliasArguments.kt") + public void testInAliasWithOwnReplaceForConstructorForAliasArguments() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorForAliasArguments.kt"); + } + + @TestMetadata("inAliasWithOwnReplaceForConstructorUnused.kt") + public void testInAliasWithOwnReplaceForConstructorUnused() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUnused.kt"); + } + + @TestMetadata("inAliasWithOwnReplaceForConstructorUsed.kt") + public void testInAliasWithOwnReplaceForConstructorUsed() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUsed.kt"); + } + + @TestMetadata("inAliasWithOwnReplaceForSecondaryConstructorUnused.kt") + public void testInAliasWithOwnReplaceForSecondaryConstructorUnused() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUnused.kt"); + } + + @TestMetadata("inAliasWithOwnReplaceForSecondaryConstructorUsed.kt") + public void testInAliasWithOwnReplaceForSecondaryConstructorUsed() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUsed.kt"); + } + + @TestMetadata("inTypeArgument.kt") + public void testInTypeArgument() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inTypeArgument.kt"); + } + + @TestMetadata("innerType.kt") + public void testInnerType() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/innerType.kt"); + } + + @TestMetadata("nestedClassToNestedClass.kt") + public void testNestedClassToNestedClass() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/nestedClassToNestedClass.kt"); + } + + @TestMetadata("noAnnotationConstructorUsage.kt") + public void testNoAnnotationConstructorUsage() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noAnnotationConstructorUsage.kt"); + } + + @TestMetadata("noMatchTypeArgument.kt") + public void testNoMatchTypeArgument() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument.kt"); + } + + @TestMetadata("noMatchTypeArgument2.kt") + public void testNoMatchTypeArgument2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument2.kt"); + } + + @TestMetadata("qualifiedClassName.kt") + public void testQualifiedClassName() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassName.kt"); + } + + @TestMetadata("qualifiedClassNameInPattern.kt") + public void testQualifiedClassNameInPattern() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassNameInPattern.kt"); + } + + @TestMetadata("secondaryConstructor.kt") + public void testSecondaryConstructor() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/secondaryConstructor.kt"); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/simple.kt"); + } + } + @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("../../../idea/tests/testData/quickfix/deprecatedSymbolUsage/functionLiteralArguments") public static class FunctionLiteralArguments extends AbstractHighLevelQuickFixTest { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation1.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation1.kt index 32598ca10d4e..15f80b9fefa5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation1.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation1.kt @@ -8,4 +8,5 @@ annotation class Foo annotation class Bar @Foo class C {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation1.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation1.kt.after index e509db41a464..7e2d9f2c0fd4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation1.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation1.kt.after @@ -9,4 +9,5 @@ annotation class Bar @Bar class C {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation2.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation2.kt index 82abac49f3df..3a86b1087d5e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation2.kt @@ -8,4 +8,5 @@ annotation class Foo(val p1: String, val p2: Int) annotation class Bar(val p1: String, val p2: Int) @Foo("", 1) class C {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation2.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation2.kt.after index 85aa3c31dd35..3a67eeb3ffe1 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation2.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation2.kt.after @@ -8,4 +8,5 @@ annotation class Foo(val p1: String, val p2: Int) annotation class Bar(val p1: String, val p2: Int) @Bar("", 1) class C {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation3.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation3.kt index fd42f2c3da62..78ee5fd11e6d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation3.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation3.kt @@ -8,4 +8,5 @@ annotation class Foo annotation class Bar(val p: Int) @Foo class C {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation3.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation3.kt.after index e3b89634e77d..eadef80b59bb 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation3.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation3.kt.after @@ -9,4 +9,5 @@ annotation class Bar(val p: Int) @Bar(1) class C {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation4.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation4.kt index 7df89c5e9aa4..c93001d15ad6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation4.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation4.kt @@ -8,4 +8,5 @@ annotation class Foo(val p: Int) annotation class Bar(val p: Int, val s: String) @Foo(1) class C {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation4.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation4.kt.after index a142ae7ab9b6..878295acd1fe 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation4.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation4.kt.after @@ -9,4 +9,5 @@ annotation class Bar(val p: Int, val s: String) @Bar(1, "") class C {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationKeepNamedArgs.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationKeepNamedArgs.kt index e5847caad56e..cec58973daeb 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationKeepNamedArgs.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationKeepNamedArgs.kt @@ -8,4 +8,5 @@ annotation class Foo(val p: Int) annotation class Bar(val p: Int, val s: String) @Foo(p = 1) class C -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationKeepNamedArgs.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationKeepNamedArgs.kt.after index 0f28009bfb99..d8ce461fd201 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationKeepNamedArgs.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationKeepNamedArgs.kt.after @@ -9,4 +9,5 @@ annotation class Bar(val p: Int, val s: String) @Bar(p = 1, s = "") class C -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget1.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget1.kt index bdda9154a674..7abc78c7b386 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget1.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget1.kt @@ -1,4 +1,5 @@ // "Replace with 'OptIn(*markerClass)'" "true" // WITH_STDLIB 1.7.0 @file:UseExperimental -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget1.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget1.kt.after index 7ecc539c839b..659902bb0cf7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget1.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget1.kt.after @@ -1,4 +1,5 @@ // "Replace with 'OptIn(*markerClass)'" "true" // WITH_STDLIB 1.7.0 @file:OptIn() -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget2.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget2.kt index ed23b551b8c0..566f8eeaed73 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget2.kt @@ -1,4 +1,5 @@ // "Replace with 'OptIn(*markerClass)'" "true" // WITH_STDLIB 1.7.0 @file:UseExperimental() -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget2.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget2.kt.after index 4599af479de4..9defa5ec5a45 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget2.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget2.kt.after @@ -1,4 +1,5 @@ // "Replace with 'OptIn(*markerClass)'" "true" // WITH_STDLIB 1.7.0 @file:OptIn() -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget3.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget3.kt index 50ac6562dfbf..80cc681030a6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget3.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget3.kt @@ -4,4 +4,5 @@ annotation class Foo annotation class Bar -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget3.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget3.kt.after index 3a7bf5ab6462..095f666308a3 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget3.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithFileUseSiteTarget3.kt.after @@ -4,4 +4,5 @@ annotation class Foo annotation class Bar -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget1.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget1.kt index 90fef4743121..df0d7cc4dde8 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget1.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget1.kt @@ -10,4 +10,5 @@ annotation class Foo @Target(AnnotationTarget.PROPERTY_GETTER) annotation class Bar -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget1.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget1.kt.after index 1f8b02547260..6ed92f3483a1 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget1.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget1.kt.after @@ -10,4 +10,5 @@ annotation class Foo @Target(AnnotationTarget.PROPERTY_GETTER) annotation class Bar -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget2.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget2.kt index 03a874e35526..5bb938e146c0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget2.kt @@ -10,4 +10,5 @@ annotation class Foo @Target(AnnotationTarget.PROPERTY_GETTER) annotation class Bar -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget2.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget2.kt.after index d0fb5ebd3f16..a46648b87298 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget2.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget2.kt.after @@ -10,4 +10,5 @@ annotation class Foo @Target(AnnotationTarget.PROPERTY_GETTER) annotation class Bar -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget3.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget3.kt index 47f9a6d6e9b9..80405960364c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget3.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget3.kt @@ -10,4 +10,5 @@ annotation class Foo(val i: Int) @Target(AnnotationTarget.PROPERTY_GETTER) annotation class Bar(val i: Int) -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget3.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget3.kt.after index ee92c2bb61c1..9feef24dfe0b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget3.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationWithGetUseSiteTarget3.kt.after @@ -10,4 +10,5 @@ annotation class Foo(val i: Int) @Target(AnnotationTarget.PROPERTY_GETTER) annotation class Bar(val i: Int) -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage1.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage1.kt index f81dffcef9d9..3b3d947314b3 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage1.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage1.kt @@ -9,4 +9,5 @@ fun foo() { OldClass(1) } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage1.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage1.kt.after index f6f3d14b77f7..293c10ea1b11 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage1.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage1.kt.after @@ -9,4 +9,5 @@ fun foo() { NewClass(1) } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage2.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage2.kt index 75e4678dffbc..b11591a02993 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage2.kt @@ -7,4 +7,5 @@ fun foo() { OldClass(1) } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage2.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage2.kt.after index 02fa38f5efb3..2530821011b2 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage2.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage2.kt.after @@ -9,4 +9,5 @@ fun foo() { Random(1) } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage3.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage3.kt index c8d4b9e39f92..2538d7e1a77a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage3.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage3.kt @@ -10,4 +10,5 @@ fun foo() { ppp.OldClass(1) } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage3.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage3.kt.after index 6e01695bb604..1d50b115d5e5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage3.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage3.kt.after @@ -10,4 +10,5 @@ fun foo() { NewClass(1) } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage4.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage4.kt index 3ae480ce4bec..1fe6831a75ff 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage4.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage4.kt @@ -10,4 +10,5 @@ fun foo() { OldClass(1) } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage4.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage4.kt.after index dc7b6a4b3c29..2b0c8f2332bd 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage4.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage4.kt.after @@ -10,4 +10,5 @@ fun foo() { NewClass(1 + 1) } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage5.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage5.kt index 26ba3b0fa161..6f2b0d8a1525 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage5.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage5.kt @@ -11,4 +11,5 @@ fun a() { A(42) } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage5.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage5.kt.after index 9f29efa87e58..a5699aeda104 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage5.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage5.kt.after @@ -11,4 +11,5 @@ fun a() { A(42) } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage6.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage6.kt index 1488f1e9d8b8..60aae46ccc04 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage6.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage6.kt @@ -13,4 +13,5 @@ fun b() { val b = 30 A(b) } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageInWholeProjectFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageInWholeProjectFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage6.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage6.kt.after index 197aef8d1039..d3a66f84b465 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage6.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage6.kt.after @@ -13,4 +13,5 @@ fun b() { val b = 30 C(s = "", a = { b }, m = b) } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageInWholeProjectFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageInWholeProjectFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage7.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage7.kt index 4614646c6beb..0affb0e0425f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage7.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage7.kt @@ -11,4 +11,5 @@ fun a() { A(42) } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageInWholeProjectFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageInWholeProjectFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage7.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage7.kt.after index 08325bd607af..7177e08c9dd9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage7.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage7.kt.after @@ -11,4 +11,5 @@ fun a() { A(b = "") { 42 } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageInWholeProjectFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageInWholeProjectFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument.kt index 89491b8c0300..8f9b76af0795 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument.kt @@ -1,4 +1,5 @@ // "Replace with 'NewClass'" "true" +// K2_ACTION: "Replace with 'NewClass'" "true" package ppp @Deprecated("renamed", ReplaceWith("NewClass")) @@ -10,4 +11,5 @@ fun foo() { OldClass() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument.kt.after index c5a2b7ed0bd1..9b3e60a587cd 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument.kt.after @@ -1,4 +1,5 @@ // "Replace with 'NewClass'" "true" +// K2_ACTION: "Replace with 'NewClass'" "true" package ppp @Deprecated("renamed", ReplaceWith("NewClass")) @@ -10,4 +11,5 @@ fun foo() { NewClass() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument2.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument2.kt index 8a6d7acee960..ad84c3151948 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument2.kt @@ -10,4 +10,5 @@ fun foo() { OldClass() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument2.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument2.kt.after index 6c508e2ed126..9a2d200a6b23 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument2.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument2.kt.after @@ -10,4 +10,5 @@ fun foo() { NewClass() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument3.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument3.kt index b7447627eeb9..6142afe52274 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument3.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument3.kt @@ -10,4 +10,5 @@ fun foo() { OldClass() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument3.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument3.kt.after index f5d858cb0dc4..b56793368a43 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument3.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument3.kt.after @@ -10,4 +10,5 @@ fun foo() { NewClass() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument4.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument4.kt index b39ea6db734f..6937b7c88684 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument4.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument4.kt @@ -1,4 +1,5 @@ // "Replace with 'Factory()'" "true" +// K2_ACTION: "Replace with 'Factory()'" "true" // WITH_STDLIB class Foo @Deprecated("", ReplaceWith("Factory()")) constructor() @@ -7,4 +8,5 @@ fun Factory(): Foo = TODO() fun baz() { val foo = Foo() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument4.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument4.kt.after index 23fdd99f157c..64b2e6fa044b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument4.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument4.kt.after @@ -1,4 +1,5 @@ // "Replace with 'Factory()'" "true" +// K2_ACTION: "Replace with 'Factory()'" "true" // WITH_STDLIB class Foo @Deprecated("", ReplaceWith("Factory()")) constructor() @@ -7,4 +8,5 @@ fun Factory(): Foo = TODO() fun baz() { val foo = Factory() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument5.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument5.kt index 194f1e52616b..7f4e01508b2d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument5.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument5.kt @@ -1,4 +1,5 @@ // "Replace with 'Factory()'" "true" +// K2_ACTION: "Replace with 'Factory()'" "true" // WITH_STDLIB class Foo @Deprecated("", ReplaceWith("Factory()")) constructor() @@ -7,4 +8,5 @@ fun Factory(): Foo = TODO() fun baz() { val foo = Foo() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument5.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument5.kt.after index 35c6c145bd9b..43dbc2cb5bd3 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument5.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument5.kt.after @@ -1,4 +1,5 @@ // "Replace with 'Factory()'" "true" +// K2_ACTION: "Replace with 'Factory()'" "true" // WITH_STDLIB class Foo @Deprecated("", ReplaceWith("Factory()")) constructor() @@ -7,4 +8,5 @@ fun Factory(): Foo = TODO() fun baz() { val foo = Factory() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument6.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument6.kt index 83e5b44be32d..42bc157aef79 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument6.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument6.kt @@ -13,4 +13,5 @@ class New : Main() fun test() { val main = Old() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument6.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument6.kt.after index 2d80078c4551..ac47869ff42e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument6.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument6.kt.after @@ -13,4 +13,5 @@ class New : Main() fun test() { val main = New() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument7.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument7.kt index f65e715606af..a959ec0813d4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument7.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument7.kt @@ -12,4 +12,5 @@ class New : Main() fun test() { val main = Old() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument7.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument7.kt.after index 53bc4f969ede..b6ea34a1312b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument7.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument7.kt.after @@ -12,4 +12,5 @@ class New : Main() fun test() { val main = New() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgumentWithoutSpecifyType.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgumentWithoutSpecifyType.kt index afc63a42c4e2..53ab1c8a00d5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgumentWithoutSpecifyType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgumentWithoutSpecifyType.kt @@ -7,4 +7,5 @@ fun Factory(): Foo = TODO() fun baz() { val foo: Foo = Foo() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgumentWithoutSpecifyType.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgumentWithoutSpecifyType.kt.after index 2dde99f1a7cd..f08dc4ea2c16 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgumentWithoutSpecifyType.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgumentWithoutSpecifyType.kt.after @@ -7,4 +7,5 @@ fun Factory(): Foo = TODO() fun baz() { val foo: Foo = Factory() } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/imports.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/imports.kt index db002e8333fd..ec80c3f93bc3 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/imports.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/imports.kt @@ -7,4 +7,5 @@ fun foo(): OldClass? { return null } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/imports.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/imports.kt.after index ac7bbbaff769..e26c5bba0e98 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/imports.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/imports.kt.after @@ -9,4 +9,5 @@ fun foo(): File? { return null } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasSimple.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasSimple.kt index 5bad467d210e..7ec03e2d472b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasSimple.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasSimple.kt @@ -8,4 +8,5 @@ class NewClass typealias Old = OldClass val a: Old = Old() -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasSimple.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasSimple.kt.after index 647198c548bd..c9528b58cc8d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasSimple.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasSimple.kt.after @@ -8,4 +8,5 @@ class NewClass typealias Old = NewClass val a: Old = Old() -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorForAliasArguments.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorForAliasArguments.kt index 4da947067277..b0124e7b57e8 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorForAliasArguments.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorForAliasArguments.kt @@ -11,4 +11,5 @@ typealias Old = OldClass<A> val o: Old = Old() val a = A() // Usage of A() -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorForAliasArguments.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorForAliasArguments.kt.after index 36a30194cbb0..f53b0a563887 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorForAliasArguments.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorForAliasArguments.kt.after @@ -11,4 +11,5 @@ typealias Old = OldClass<B> val o: Old = Old() val a = A() // Usage of A() -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUnused.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUnused.kt index c8ed9e674abe..912a9eabc7ae 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUnused.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUnused.kt @@ -8,4 +8,5 @@ class NewClass(p: Int) typealias Old = OldClass val a: Old = null!! -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUnused.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUnused.kt.after index 8edba281c47c..abfbe0d35fd2 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUnused.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUnused.kt.after @@ -8,4 +8,5 @@ class NewClass(p: Int) typealias Old = NewClass val a: Old = null!! -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUsed.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUsed.kt index 498fa57447f2..3a04003d7a99 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUsed.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUsed.kt @@ -12,4 +12,5 @@ class NewClass(p: Int) typealias Old = OldClass val a: Old = aa.Old() -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUsed.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUsed.kt.after index 498fa57447f2..3a04003d7a99 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUsed.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUsed.kt.after @@ -12,4 +12,5 @@ class NewClass(p: Int) typealias Old = OldClass val a: Old = aa.Old() -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUnused.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUnused.kt index 04aef8ca9d10..b3c798ac2f3d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUnused.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUnused.kt @@ -10,4 +10,5 @@ class NewClass(p: Int = 0) typealias Old = OldClass val a: Old = Old() -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUnused.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUnused.kt.after index c067a9e1283f..8268c3dd346d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUnused.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUnused.kt.after @@ -10,4 +10,5 @@ class NewClass(p: Int = 0) typealias Old = NewClass val a: Old = Old() -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUsed.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUsed.kt index ef7ef513402f..c52700bcfbd6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUsed.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUsed.kt @@ -12,4 +12,5 @@ class NewClass(p: Int) typealias Old = OldClass val a: Old = Old(1) -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUsed.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUsed.kt.after index ef7ef513402f..c52700bcfbd6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUsed.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUsed.kt.after @@ -12,4 +12,5 @@ class NewClass(p: Int) typealias Old = OldClass val a: Old = Old(1) -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inTypeArgument.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inTypeArgument.kt index 6964662ca358..b75d77b9e2ad 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inTypeArgument.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inTypeArgument.kt @@ -9,4 +9,5 @@ fun foo(): List>? { return null } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inTypeArgument.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inTypeArgument.kt.after index 4f657b6332ae..719f9d89ef68 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inTypeArgument.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/inTypeArgument.kt.after @@ -9,4 +9,5 @@ fun foo(): List? { return null } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/innerType.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/innerType.kt index 5dd136ff5731..547cf5ce8367 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/innerType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/innerType.kt @@ -1,4 +1,5 @@ // "Replace with 'B>'" "true" +// K2_ACTION: "Replace with 'B'" "true" // WITH_STDLIB @Deprecated(message = "renamed", replaceWith = ReplaceWith("B")) @@ -10,4 +11,5 @@ class F fun test() { var x: A> } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/innerType.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/innerType.kt.after index d2bda1a8a103..9c1c1d7a3c26 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/innerType.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/innerType.kt.after @@ -1,4 +1,5 @@ // "Replace with 'B>'" "true" +// K2_ACTION: "Replace with 'B'" "true" // WITH_STDLIB @Deprecated(message = "renamed", replaceWith = ReplaceWith("B")) @@ -10,4 +11,5 @@ class F fun test() { var x: B> } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/nestedClassToNestedClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/nestedClassToNestedClass.kt index bdd519ae3fc8..4a466a0cb4a0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/nestedClassToNestedClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/nestedClassToNestedClass.kt @@ -11,4 +11,5 @@ fun foo(): Outer.OldClass? { return null } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/nestedClassToNestedClass.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/nestedClassToNestedClass.kt.after index 68441d3e8080..b50c57331308 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/nestedClassToNestedClass.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/nestedClassToNestedClass.kt.after @@ -11,4 +11,5 @@ fun foo(): Outer.NewClass? { return null } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument.kt index afb61b7619e0..3393aa9331f9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument.kt @@ -9,4 +9,5 @@ fun foo() { var c: C } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument.kt.after index cc21554ce385..a177446c325b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument.kt.after @@ -9,4 +9,5 @@ fun foo() { var c: B } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument2.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument2.kt index 9396b8e29b67..e573fd136907 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument2.kt @@ -9,4 +9,5 @@ fun foo() { var c: C } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument2.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument2.kt.after index 864a58dcd831..23dc468290de 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument2.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/noMatchTypeArgument2.kt.after @@ -9,4 +9,5 @@ fun foo() { var c: B } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassName.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassName.kt index 64f668bbc0b1..c9891d8184e5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassName.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassName.kt @@ -11,4 +11,5 @@ fun foo(): ppp.OldClass? { return null } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassName.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassName.kt.after index 2fd637317ecb..2319c849cf2a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassName.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassName.kt.after @@ -11,4 +11,5 @@ fun foo(): NewClass? { return null } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassNameInPattern.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassNameInPattern.kt index c5952c0d52a8..ca62776c1743 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassNameInPattern.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassNameInPattern.kt @@ -7,4 +7,5 @@ fun foo(): OldClass? { return null } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassNameInPattern.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassNameInPattern.kt.after index a70d110b9390..02cd12d87d6a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassNameInPattern.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassNameInPattern.kt.after @@ -9,4 +9,5 @@ fun foo(): File? { return null } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/simple.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/simple.kt index a1123158421c..9903cb923c58 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/simple.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/simple.kt @@ -9,4 +9,5 @@ fun foo(): OldClass? { return null } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/simple.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/simple.kt.after index 236784ce24ab..e6fbfab93ae4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/simple.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/classUsages/simple.kt.after @@ -9,4 +9,5 @@ fun foo(): NewClass? { return null } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/objects.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/objects.kt index 90e7bad0f1b3..bc1f3d896198 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/objects.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/objects.kt @@ -12,4 +12,4 @@ object Old { val test = Old.foo() // FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix -/* IGNORE_K2 */ \ No newline at end of file +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/objects.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/objects.kt.after index d1567862e52b..fc7a050a9ede 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/objects.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/objects.kt.after @@ -12,4 +12,4 @@ object Old { val test = New.foo() // FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix -/* IGNORE_K2 */ \ No newline at end of file +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/objectsInQualified.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/objectsInQualified.kt index cb93572ba6f3..3957377b8176 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/objectsInQualified.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/objectsInQualified.kt @@ -12,4 +12,4 @@ object Old { val test = some.Old // FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix -/* IGNORE_K2 */ \ No newline at end of file +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/objectsInQualified.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/objectsInQualified.kt.after index e5e932444d32..826afa789c0e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/objectsInQualified.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/objectsInQualified.kt.after @@ -12,4 +12,4 @@ object Old { val test = New // FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix -/* IGNORE_K2 */ \ No newline at end of file +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/conflictOnTypeAndAlias.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/conflictOnTypeAndAlias.kt index 18c04ece7b59..87a8230ffa6d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/conflictOnTypeAndAlias.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/conflictOnTypeAndAlias.kt @@ -18,3 +18,5 @@ typealias New = NewClass fun foo() { Old() } + +/* IGNORE_K2 */ diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/transitiveLong.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/transitiveLong.kt index 8893a542f683..6b391fc3ee7e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/transitiveLong.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/transitiveLong.kt @@ -14,4 +14,5 @@ typealias Old2 = Old1 class NewClass() -fun foo() = Old2() \ No newline at end of file +fun foo() = Old2() +/* IGNORE_K2 */ \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/withTypeArgument.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/withTypeArgument.kt index 87e1403eda6b..26faaaec8f67 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/withTypeArgument.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/withTypeArgument.kt @@ -10,4 +10,4 @@ typealias B = List val x: A = emptyList() // FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix -/* IGNORE_K2 */ \ No newline at end of file +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/withTypeArgument.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/withTypeArgument.kt.after index fdf89b236f73..db24a9e62984 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/withTypeArgument.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/withTypeArgument.kt.after @@ -10,4 +10,4 @@ typealias B = List val x: B = emptyList() // FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.replaceWith.DeprecatedSymbolUsageFix -/* IGNORE_K2 */ \ No newline at end of file +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.fixes.replaceWith.DeprecatedSymbolUsageFix \ No newline at end of file diff --git a/plugins/kotlin/refactorings/kotlin.refactorings.common/src/org/jetbrains/kotlin/idea/refactoring/inline/codeInliner/ReplacementPerformer.kt b/plugins/kotlin/refactorings/kotlin.refactorings.common/src/org/jetbrains/kotlin/idea/refactoring/inline/codeInliner/ReplacementPerformer.kt index 4dfa6c5e60f5..23eb694307a8 100644 --- a/plugins/kotlin/refactorings/kotlin.refactorings.common/src/org/jetbrains/kotlin/idea/refactoring/inline/codeInliner/ReplacementPerformer.kt +++ b/plugins/kotlin/refactorings/kotlin.refactorings.common/src/org/jetbrains/kotlin/idea/refactoring/inline/codeInliner/ReplacementPerformer.kt @@ -69,7 +69,6 @@ class AnnotationEntryReplacementPerformer( override fun createDummyElement(mainExpression: KtExpression): KtAnnotationEntry = createByPattern("@Dummy($0)", mainExpression) { psiFactory.createAnnotationEntry(it) } - @Suppress("KotlinConstantConditions") // KTIJ-23767 override fun rangeToElement(range: PsiChildRange): KtAnnotationEntry { val useSiteTargetText = useSiteTarget?.renderName?.let { "$it:" } ?: "" val isFileUseSiteTarget = useSiteTarget == AnnotationUseSiteTarget.FILE diff --git a/plugins/kotlin/refactorings/kotlin.refactorings.k2/kotlin.refactorings.k2.iml b/plugins/kotlin/refactorings/kotlin.refactorings.k2/kotlin.refactorings.k2.iml index f9e0252b3566..311377550888 100644 --- a/plugins/kotlin/refactorings/kotlin.refactorings.k2/kotlin.refactorings.k2.iml +++ b/plugins/kotlin/refactorings/kotlin.refactorings.k2/kotlin.refactorings.k2.iml @@ -56,5 +56,6 @@ + \ No newline at end of file diff --git a/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/inline/codeInliner/ClassUsageReplacementStrategy.kt b/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/inline/codeInliner/ClassUsageReplacementStrategy.kt new file mode 100644 index 000000000000..0044ea27268e --- /dev/null +++ b/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/inline/codeInliner/ClassUsageReplacementStrategy.kt @@ -0,0 +1,122 @@ +// 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.refactoring.inline.codeInliner + +import com.intellij.openapi.project.Project +import org.jetbrains.kotlin.idea.base.analysis.api.utils.shortenReferences +import org.jetbrains.kotlin.idea.base.psi.replaced +import org.jetbrains.kotlin.idea.refactoring.inline.codeInliner.CodeToInline +import org.jetbrains.kotlin.idea.refactoring.inline.codeInliner.UsageReplacementStrategy +import org.jetbrains.kotlin.idea.references.KtSimpleNameReference +import org.jetbrains.kotlin.idea.references.mainReference +import org.jetbrains.kotlin.idea.stubindex.KotlinClassShortNameIndex +import org.jetbrains.kotlin.name.FqName +import org.jetbrains.kotlin.psi.* +import org.jetbrains.kotlin.psi.psiUtil.getQualifiedExpressionForSelector + +class ClassUsageReplacementStrategy( + typeReplacement: KtUserType?, + constructorReplacement: CodeToInline?, + project: Project +) : UsageReplacementStrategy { + + private val factory = KtPsiFactory(project) + + private val typeReplacement = typeReplacement?.takeIf { it.referenceExpression != null } + private val typeReplacementQualifierAsExpression = typeReplacement?.qualifier?.let { factory.createExpression(it.text) } + + private val constructorReplacementStrategy = constructorReplacement?.let { + CallableUsageReplacementStrategy(it, inlineSetter = false) + } + + override fun createReplacer(usage: KtReferenceExpression): (() -> KtElement?)? { + if (usage !is KtNameReferenceExpression) return null + + constructorReplacementStrategy?.createReplacer(usage)?.let { return it } + + when (val parent = usage.parent) { + is KtUserType -> { + if (typeReplacement == null) return null + return { + val oldArgumentList = parent.typeArgumentList?.copy() as? KtTypeArgumentList + val replaced = parent.replaced(typeReplacement) + val newArgumentList = replaced.typeArgumentList + if (oldArgumentList != null && oldArgumentList.arguments.size == newArgumentList?.arguments?.size) { + newArgumentList.replace(oldArgumentList) + } + + shortenReferences(replaced) as? KtElement + } + } + + is KtCallElement -> { + if (usage != parent.calleeExpression) return null + when { + constructorReplacementStrategy == null && typeReplacement != null -> return { + replaceConstructorCallWithOtherTypeConstruction(parent) + } + else -> return null + } + } + + else -> { + if (typeReplacement != null) { + val fqNameStr = typeReplacement.text + val fqName = FqName(fqNameStr) + + return { + usage.mainReference.bindToFqName(fqName, KtSimpleNameReference.ShorteningMode.FORCED_SHORTENING) as? KtElement + } + } + + return null + } + } + } + + private fun replaceConstructorCallWithOtherTypeConstruction(callExpression: KtCallElement): KtElement? { + val referenceExpression = typeReplacement?.referenceExpression ?: error("Couldn't find referenceExpression") + val classFromReplacement = KotlinClassShortNameIndex + .get(referenceExpression.text, callExpression.project, callExpression.resolveScope) + .firstOrNull() + + val replacementTypeArgumentList = typeReplacement.typeArgumentList + val replacementTypeArgumentCount = classFromReplacement?.typeParameters?.size + ?: replacementTypeArgumentList?.arguments?.size + + val typeArgumentList = callExpression.typeArgumentList + val constructor = callExpression.mainReference?.resolve() + val typeArgumentCount = (constructor as? KtConstructor<*>)?.typeParameters?.size ?: typeArgumentList?.arguments?.size + + if (typeArgumentCount != replacementTypeArgumentCount) { + if (replacementTypeArgumentList == null) typeArgumentList?.delete() + else callExpression.replaceOrCreateTypeArgumentList( + replacementTypeArgumentList.copy() as KtTypeArgumentList + ) + } + + callExpression.calleeExpression?.replace(referenceExpression) + + val expressionToReplace = callExpression.getQualifiedExpressionForSelector() ?: callExpression + val newExpression = if (typeReplacementQualifierAsExpression != null) + factory.createExpressionByPattern("$0.$1", typeReplacementQualifierAsExpression, callExpression) + else + callExpression + + val result = if (expressionToReplace != newExpression) { + expressionToReplace.replaced(newExpression) + } else { + expressionToReplace + } + + return shortenReferences(result) as? KtElement + } +} + +private fun KtCallElement.replaceOrCreateTypeArgumentList(newTypeArgumentList: KtTypeArgumentList) { + if (typeArgumentList != null) typeArgumentList?.replace(newTypeArgumentList) + else addAfter( + newTypeArgumentList, + calleeExpression, + ) +} \ No newline at end of file diff --git a/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/inline/codeInliner/CodeInliner.kt b/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/inline/codeInliner/CodeInliner.kt index b874ab7c5537..712e1e324ad3 100644 --- a/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/inline/codeInliner/CodeInliner.kt +++ b/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/inline/codeInliner/CodeInliner.kt @@ -3,7 +3,6 @@ package org.jetbrains.kotlin.idea.k2.refactoring.inline.codeInliner import com.intellij.psi.createSmartPointer import com.intellij.psi.search.LocalSearchScope -import com.intellij.psi.util.PsiTreeUtil import org.jetbrains.kotlin.analysis.api.KaExperimentalApi import org.jetbrains.kotlin.analysis.api.KaSession import org.jetbrains.kotlin.analysis.api.analyze @@ -26,6 +25,7 @@ import org.jetbrains.kotlin.idea.base.searching.usages.ReferencesSearchScopeHelp import org.jetbrains.kotlin.idea.core.CollectingNameValidator import org.jetbrains.kotlin.idea.k2.refactoring.util.LambdaToAnonymousFunctionUtil import org.jetbrains.kotlin.idea.refactoring.inline.codeInliner.AbstractCodeInliner +import org.jetbrains.kotlin.idea.refactoring.inline.codeInliner.AnnotationEntryReplacementPerformer import org.jetbrains.kotlin.idea.refactoring.inline.codeInliner.CodeToInline import org.jetbrains.kotlin.idea.refactoring.inline.codeInliner.CommentHolder import org.jetbrains.kotlin.idea.refactoring.inline.codeInliner.ExpressionReplacementPerformer @@ -52,7 +52,15 @@ class CodeInliner( codeToInline: CodeToInline ) : AbstractCodeInliner(call, codeToInline) { private val mapping: Map? = analyze(call) { - call.resolveToCall()?.singleFunctionCallOrNull()?.argumentMapping?.mapValues { e -> e.value.name } + treeUpToCall().resolveToCall()?.singleFunctionCallOrNull()?.argumentMapping?.mapValues { e -> e.value.name } + } + + private fun treeUpToCall(): KtElement { + val userType = call.parent as? KtUserType ?: return call + val typeReference = userType.parent as? KtTypeReference ?: return call + val constructorCalleeExpression = typeReference.parent as? KtConstructorCalleeExpression ?: return call + val gParent = constructorCalleeExpression.parent + return gParent as? KtSuperTypeCallEntry ?: gParent as? KtAnnotationEntry ?: call } @OptIn(KaExperimentalApi::class) @@ -60,16 +68,14 @@ class CodeInliner( val qualifiedElement = if (call is KtExpression) { call.getQualifiedExpressionForSelector() ?: call.callableReferenceExpressionForReference() - ?: call.parent as? KtSuperTypeCallEntry - ?: call + ?: treeUpToCall() } else call val assignment = (qualifiedElement as? KtExpression) ?.getAssignmentByLHS() ?.takeIf { it.operationToken == KtTokens.EQ } val originalDeclaration = analyze(call) { (call.parent as? KtCallableReferenceExpression - ?: PsiTreeUtil.getParentOfType(call, KtSuperTypeCallEntry::class.java) - ?: call) + ?: treeUpToCall()) .resolveToCall()?.singleCallOrNull>()?.partiallyAppliedSymbol?.symbol?.psi as? KtDeclaration } ?: return null val callableForParameters = (if (assignment != null && originalDeclaration is KtProperty) @@ -157,7 +163,7 @@ class CodeInliner( processTypeParameterUsages( callElement = call as? KtCallElement, - typeParameters = (originalDeclaration as? KtCallableDeclaration)?.typeParameters ?: emptyList(), + typeParameters = (originalDeclaration as? KtConstructor<*>)?.containingClass()?.typeParameters ?: (originalDeclaration as? KtCallableDeclaration)?.typeParameters ?: emptyList(), namer = { it.nameAsSafeName }, typeRetriever = { analyze(callableForParameters) { @@ -208,6 +214,7 @@ class CodeInliner( findAndMarkNewDeclarations() val performer = when (elementToBeReplaced) { is KtExpression -> ExpressionReplacementPerformer(codeToInline, elementToBeReplaced) + is KtAnnotationEntry -> AnnotationEntryReplacementPerformer(codeToInline, elementToBeReplaced) is KtSuperTypeCallEntry -> SuperTypeCallEntryReplacementPerformer(codeToInline, elementToBeReplaced) else -> error("Unsupported element: $elementToBeReplaced") } diff --git a/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/inline/codeInliner/InlinePostProcessor.kt b/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/inline/codeInliner/InlinePostProcessor.kt index 357eade74318..a398777c66f7 100644 --- a/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/inline/codeInliner/InlinePostProcessor.kt +++ b/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/inline/codeInliner/InlinePostProcessor.kt @@ -231,6 +231,7 @@ object InlinePostProcessor: AbstractInlinePostProcessor() { } } + val replacementMap = mutableMapOf() analyze(element) { for (callExpression in callsToProcess) { val resolvedCall = callExpression.resolveToCall()?.successfulFunctionCallOrNull() ?: return @@ -248,9 +249,10 @@ object InlinePostProcessor: AbstractInlinePostProcessor() { newArgument.putCopyableUserData(DEFAULT_PARAMETER_VALUE_KEY, Unit) } - argument.replace(newArgument) + replacementMap.put(argument, newArgument) } } } + replacementMap.forEach { (argument, replacement) -> argument.replace(replacement) } } } \ No newline at end of file diff --git a/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/inline/codeInliner/InlinePreprocessorUtil.kt b/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/inline/codeInliner/InlinePreprocessorUtil.kt index c5cb2cfc9740..2eaded814d42 100644 --- a/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/inline/codeInliner/InlinePreprocessorUtil.kt +++ b/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/inline/codeInliner/InlinePreprocessorUtil.kt @@ -8,7 +8,9 @@ import org.jetbrains.kotlin.analysis.api.permissions.KaAllowAnalysisFromWriteAct import org.jetbrains.kotlin.analysis.api.permissions.KaAllowAnalysisOnEdt import org.jetbrains.kotlin.analysis.api.permissions.allowAnalysisFromWriteAction import org.jetbrains.kotlin.analysis.api.permissions.allowAnalysisOnEdt +import org.jetbrains.kotlin.analysis.api.resolution.KaCallableMemberCall import org.jetbrains.kotlin.analysis.api.resolution.KaImplicitReceiverValue +import org.jetbrains.kotlin.analysis.api.resolution.singleCallOrNull import org.jetbrains.kotlin.analysis.api.resolution.singleFunctionCallOrNull import org.jetbrains.kotlin.analysis.api.resolution.singleVariableAccessCall import org.jetbrains.kotlin.analysis.api.resolution.symbol @@ -246,15 +248,14 @@ internal fun encodeInternalReferences(codeToInline: MutableCodeToInline, origina if (receiverExpression == null) { val (receiverValue, isSameReceiverType) = analyze(expression) { val resolveCall = expression.resolveToCall() - val partiallyAppliedSymbol = - (resolveCall?.singleFunctionCallOrNull() ?: resolveCall?.singleVariableAccessCall())?.partiallyAppliedSymbol + val partiallyAppliedSymbol = resolveCall?.singleCallOrNull>()?.partiallyAppliedSymbol val value = (partiallyAppliedSymbol?.extensionReceiver ?: partiallyAppliedSymbol?.dispatchReceiver) as? KaImplicitReceiverValue val originalSymbol = originalDeclaration.symbol as? KaCallableSymbol val originalSymbolReceiverType = originalSymbol?.receiverType val originalSymbolDispatchType = originalSymbol?.dispatchReceiverType - if (value != null) { + if (value != null && !(resolve is KtParameter && resolve.ownerFunction == originalDeclaration)) { getThisQualifier(value) to (originalSymbolReceiverType != null && value.type.isEqualTo(originalSymbolReceiverType) || originalSymbolDispatchType != null && value.type.isEqualTo(originalSymbolDispatchType)) } else { 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 9333d91a4aaf..3cee3fa9a715 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 @@ -115,7 +115,7 @@ internal fun MutableTWorkspace.generateK2FixTests() { model("$idea/quickfix/declaringJavaClass", pattern = pattern, isIgnored = true) model("$idea/quickfix/decreaseVisibility", pattern = pattern) model("$idea/quickfix/deprecatedJavaAnnotation", pattern = pattern, isIgnored = true) - model("$idea/quickfix/deprecatedSymbolUsage", pattern = pattern, isIgnored = false, excludedDirectories = listOf("classUsages", "publishedApi", "wholeProject")) + model("$idea/quickfix/deprecatedSymbolUsage", pattern = pattern, isIgnored = false, excludedDirectories = listOf("publishedApi", "wholeProject")) model("$idea/quickfix/equalityNotApplicable", pattern = pattern) model("$idea/quickfix/final", pattern = pattern, isIgnored = true) model("$idea/quickfix/foldTryCatch", pattern = pattern)