diff --git a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/CommaInWhenConditionWithoutArgumentFixFactories.kt b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/CommaInWhenConditionWithoutArgumentFixFactories.kt new file mode 100644 index 000000000000..502fd8a07c99 --- /dev/null +++ b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/CommaInWhenConditionWithoutArgumentFixFactories.kt @@ -0,0 +1,16 @@ +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package org.jetbrains.kotlin.idea.k2.codeinsight.fixes + +import org.jetbrains.kotlin.analysis.api.fir.diagnostics.KaFirDiagnostic +import org.jetbrains.kotlin.idea.codeinsight.api.applicators.fixes.KotlinQuickFixFactory +import org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix +import org.jetbrains.kotlin.psi.KtWhenExpression + +internal object CommaInWhenConditionWithoutArgumentFixFactories { + + val replaceCommaWithOrFixFactory = KotlinQuickFixFactory.ModCommandBased { diagnostic: KaFirDiagnostic.CommaInWhenConditionWithoutArgument -> + listOfNotNull( + (diagnostic.psi.parent as? KtWhenExpression)?.let(::CommaInWhenConditionWithoutArgumentFix) + ) + } +} diff --git a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/KotlinK2QuickFixRegistrar.kt b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/KotlinK2QuickFixRegistrar.kt index 16b0fd0d9516..f1d42ac6a750 100644 --- a/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/KotlinK2QuickFixRegistrar.kt +++ b/plugins/kotlin/code-insight/fixes-k2/src/org/jetbrains/kotlin/idea/k2/codeinsight/fixes/KotlinK2QuickFixRegistrar.kt @@ -371,7 +371,7 @@ class KotlinK2QuickFixRegistrar : KotlinQuickFixRegistrar() { // TODO: NON_EXHAUSTIVE_WHEN[_ON_SEALED_CLASS] will be replaced in future. We need to register the fix for those diagnostics as well registerPsiQuickFixes(KaFirDiagnostic.NoElseInWhen::class, AddWhenElseBranchFix) registerFactory(AddWhenRemainingBranchFixFactories.noElseInWhen) - registerPsiQuickFixes(KaFirDiagnostic.CommaInWhenConditionWithoutArgument::class, CommaInWhenConditionWithoutArgumentFix) + registerFactory(CommaInWhenConditionWithoutArgumentFixFactories.replaceCommaWithOrFixFactory) registerPsiQuickFixes(KaFirDiagnostic.SenselessNullInWhen::class, RemoveWhenBranchFix) } 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 2200c886540e..2918770e23d2 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 @@ -9940,6 +9940,30 @@ public abstract class HighLevelQuickFixTestGenerated extends AbstractHighLevelQu + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../../idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument") + public static class CommasInWhenWithoutArgument 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("commasInConditionWithNoArguments.kt") + public void testCommasInConditionWithNoArguments() throws Exception { + runTest("../../../idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments.kt"); + } + + @TestMetadata("commasInConditionWithNoArguments2.kt") + public void testCommasInConditionWithNoArguments2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments2.kt"); + } + } + @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("../../../idea/tests/testData/quickfix/migration/missingConstructorKeyword") public static class MissingConstructorKeyword extends AbstractHighLevelQuickFixTest { diff --git a/plugins/kotlin/frontend-independent/src/org/jetbrains/kotlin/idea/quickfix/CommaInWhenConditionWithoutArgumentFix.kt b/plugins/kotlin/frontend-independent/src/org/jetbrains/kotlin/idea/quickfix/CommaInWhenConditionWithoutArgumentFix.kt index 280ecf4cdf38..c347259ef5e6 100644 --- a/plugins/kotlin/frontend-independent/src/org/jetbrains/kotlin/idea/quickfix/CommaInWhenConditionWithoutArgumentFix.kt +++ b/plugins/kotlin/frontend-independent/src/org/jetbrains/kotlin/idea/quickfix/CommaInWhenConditionWithoutArgumentFix.kt @@ -5,81 +5,76 @@ package org.jetbrains.kotlin.idea.quickfix -import com.intellij.codeInsight.intention.IntentionAction -import com.intellij.openapi.editor.Editor -import com.intellij.openapi.project.Project +import com.intellij.modcommand.ActionContext +import com.intellij.modcommand.ModPsiUpdater +import com.intellij.modcommand.PsiUpdateModCommandAction import com.intellij.psi.PsiElement import com.intellij.util.containers.addIfNotNull import org.jetbrains.kotlin.idea.base.resources.KotlinBundle import org.jetbrains.kotlin.idea.codeinsight.api.classic.quickfixes.CleanupFix -import org.jetbrains.kotlin.idea.codeinsight.api.classic.quickfixes.KotlinPsiOnlyQuickFixAction -import org.jetbrains.kotlin.idea.codeinsight.api.classic.quickfixes.PsiElementSuitabilityCheckers -import org.jetbrains.kotlin.idea.codeinsight.api.classic.quickfixes.QuickFixesPsiBasedFactory import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.psi.* -class CommaInWhenConditionWithoutArgumentFix(element: KtWhenExpression) : KotlinPsiOnlyQuickFixAction(element), - CleanupFix { - override fun getFamilyName(): String = text - override fun getText(): String = KotlinBundle.message("replace.with.in.when") +class CommaInWhenConditionWithoutArgumentFix( + element: KtWhenExpression, +) : PsiUpdateModCommandAction(element), CleanupFix.ModCommand { - override fun invoke(project: Project, editor: Editor?, file: KtFile) { - val whenExpression = element ?: return - replaceCommasWithOrsInWhenExpression(whenExpression) + override fun getFamilyName(): String = KotlinBundle.message("replace.with.in.when") + + override fun invoke( + context: ActionContext, + element: KtWhenExpression, + updater: ModPsiUpdater, + ) { + replaceCommasWithOrsInWhenExpression(element) } - companion object : QuickFixesPsiBasedFactory(PsiElement::class, PsiElementSuitabilityCheckers.ALWAYS_SUITABLE) { - override fun doCreateQuickFix(psiElement: PsiElement): List { - return listOfNotNull((psiElement.parent?.parent as? KtWhenExpression)?.let(::CommaInWhenConditionWithoutArgumentFix)) - } + private class WhenEntryConditionsData( + val conditions: List, + val first: PsiElement, + val last: PsiElement, + val arrow: PsiElement + ) - private class WhenEntryConditionsData( - val conditions: List, - val first: PsiElement, - val last: PsiElement, - val arrow: PsiElement - ) - - private fun replaceCommasWithOrsInWhenExpression(whenExpression: KtWhenExpression) { - for (whenEntry in whenExpression.entries) { - if (whenEntry.conditions.size > 1) { - val conditionsData = getConditionsDataOrNull(whenEntry) ?: return - // Leave branch untouched if there are no valid conditions - if (conditionsData.conditions.isEmpty()) continue - val replacement = KtPsiFactory(whenEntry.project).buildExpression { - appendExpressions(conditionsData.conditions, separator = "||") - } - whenEntry.deleteChildRange(conditionsData.first, conditionsData.last) - whenEntry.addBefore(replacement, conditionsData.arrow) + private fun replaceCommasWithOrsInWhenExpression(whenExpression: KtWhenExpression) { + for (whenEntry in whenExpression.entries) { + if (whenEntry.conditions.size > 1) { + val conditionsData = getConditionsDataOrNull(whenEntry) ?: return + // Leave branch untouched if there are no valid conditions + if (conditionsData.conditions.isEmpty()) continue + val replacement = KtPsiFactory(whenEntry.project).buildExpression { + appendExpressions(conditionsData.conditions, separator = "||") } + whenEntry.deleteChildRange(conditionsData.first, conditionsData.last) + whenEntry.addBefore(replacement, conditionsData.arrow) } } + } - private fun getConditionsDataOrNull(whenEntry: KtWhenEntry): WhenEntryConditionsData? { - val conditions = mutableListOf() + private fun getConditionsDataOrNull(whenEntry: KtWhenEntry): WhenEntryConditionsData? { + val conditions = mutableListOf() - var arrow: PsiElement? = null + var arrow: PsiElement? = null - var child = whenEntry.firstChild - whenEntryChildren@ while (child != null) { - when { - child is KtWhenConditionWithExpression -> { - conditions.addIfNotNull(child.expression) - } - child.node.elementType == KtTokens.ARROW -> { - arrow = child - break@whenEntryChildren - } + var child = whenEntry.firstChild + whenEntryChildren@ while (child != null) { + when { + child is KtWhenConditionWithExpression -> { + conditions.addIfNotNull(child.expression) + } + child.node.elementType == KtTokens.ARROW -> { + arrow = child + break@whenEntryChildren } - child = child.nextSibling } - - val last = child?.prevSibling - - return if (arrow != null && last != null) - WhenEntryConditionsData(conditions, whenEntry.firstChild, last, arrow) - else - null + child = child.nextSibling } + + val last = child?.prevSibling + + return if (arrow != null && last != null) + WhenEntryConditionsData(conditions, whenEntry.firstChild, last, arrow) + else + null } } \ No newline at end of file diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/quickfix/CommaInWhenConditionWithoutArgumentFixFactory.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/quickfix/CommaInWhenConditionWithoutArgumentFixFactory.kt new file mode 100644 index 000000000000..65de2a4e5164 --- /dev/null +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/quickfix/CommaInWhenConditionWithoutArgumentFixFactory.kt @@ -0,0 +1,17 @@ +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package org.jetbrains.kotlin.idea.quickfix + +import com.intellij.codeInsight.intention.IntentionAction +import com.intellij.psi.PsiElement +import org.jetbrains.kotlin.idea.codeinsight.api.classic.quickfixes.PsiElementSuitabilityCheckers +import org.jetbrains.kotlin.idea.codeinsight.api.classic.quickfixes.QuickFixesPsiBasedFactory +import org.jetbrains.kotlin.psi.KtWhenExpression + +internal object CommaInWhenConditionWithoutArgumentFixFactory : QuickFixesPsiBasedFactory(PsiElement::class, PsiElementSuitabilityCheckers.ALWAYS_SUITABLE) { + + override fun doCreateQuickFix(psiElement: PsiElement): List { + return listOfNotNull( + (psiElement.parent?.parent as? KtWhenExpression)?.let { CommaInWhenConditionWithoutArgumentFix(it).asIntention() } + ) + } +} diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixRegistrar.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixRegistrar.kt index 41576e8f982c..72fa0d039e3c 100644 --- a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixRegistrar.kt +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixRegistrar.kt @@ -561,7 +561,7 @@ class QuickFixRegistrar : QuickFixContributor { MISPLACED_TYPE_PARAMETER_CONSTRAINTS.registerFactory(MoveTypeParameterConstraintFixFactory) - COMMA_IN_WHEN_CONDITION_WITHOUT_ARGUMENT.registerFactory(CommaInWhenConditionWithoutArgumentFix) + COMMA_IN_WHEN_CONDITION_WITHOUT_ARGUMENT.registerFactory(CommaInWhenConditionWithoutArgumentFixFactory) DATA_CLASS_NOT_PROPERTY_PARAMETER.registerFactory(AddValVarToConstructorParameterAction.DataClassConstructorNotPropertyQuickFixFactory) MISSING_VAL_ON_ANNOTATION_PARAMETER.registerFactory(AddValVarToConstructorParameterAction.AnnotationClassConstructorNotValPropertyQuickFixFactory) diff --git a/plugins/kotlin/idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments.kt b/plugins/kotlin/idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments.kt index 3f9ad2a62ebe..20583631f944 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments.kt @@ -9,4 +9,5 @@ fun test(i: Int, j: Int) { else -> { /* other code */ } } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments.kt.after index 6cf4b7389505..efa11cf8463b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments.kt.after @@ -9,4 +9,5 @@ fun test(i: Int, j: Int) { else -> { /* other code */ } } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments2.kt b/plugins/kotlin/idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments2.kt index d646b0ccd811..dae229198115 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments2.kt @@ -6,4 +6,5 @@ fun test(a: Boolean, b: Boolean, c: Boolean) { else -> "e" } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments2.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments2.kt.after index 640a3a398a32..8648e8dc127a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments2.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments2.kt.after @@ -6,4 +6,5 @@ fun test(a: Boolean, b: Boolean, c: Boolean) { else -> "e" } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/when/commasInConditionWithNoArguments.kt b/plugins/kotlin/idea/tests/testData/quickfix/when/commasInConditionWithNoArguments.kt index e84b4eea4e95..6b9389dd356f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/when/commasInConditionWithNoArguments.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/when/commasInConditionWithNoArguments.kt @@ -13,5 +13,5 @@ fun test(i: Int, j: Int) { else -> { /* other code */ } } } -/* IGNORE_K2 */ -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/when/commasInConditionWithNoArguments.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/when/commasInConditionWithNoArguments.kt.after index 6eaabf8e27b3..bd24ac8bf14d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/when/commasInConditionWithNoArguments.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/when/commasInConditionWithNoArguments.kt.after @@ -13,5 +13,5 @@ fun test(i: Int, j: Int) { else -> { /* other code */ } } } -/* IGNORE_K2 */ -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/when/commasInConditionWithNoArguments2.kt b/plugins/kotlin/idea/tests/testData/quickfix/when/commasInConditionWithNoArguments2.kt index 723e22737fd2..eb7a20bd74e6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/when/commasInConditionWithNoArguments2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/when/commasInConditionWithNoArguments2.kt @@ -6,6 +6,6 @@ fun test(a: Boolean, b: Boolean, c: Boolean) { else -> "e" } } -/* IGNORE_K2 */ -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/when/commasInConditionWithNoArguments2.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/when/commasInConditionWithNoArguments2.kt.after index ef3737902ee3..b29483686841 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/when/commasInConditionWithNoArguments2.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/when/commasInConditionWithNoArguments2.kt.after @@ -6,6 +6,6 @@ fun test(a: Boolean, b: Boolean, c: Boolean) { else -> "e" } } -/* IGNORE_K2 */ -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.CommaInWhenConditionWithoutArgumentFix \ No newline at end of file diff --git a/plugins/kotlin/util/test-generator-fir/test/org/jetbrains/kotlin/fir/testGenerator/codeinsight/GenerateK2QuickFixTests.kt b/plugins/kotlin/util/test-generator-fir/test/org/jetbrains/kotlin/fir/testGenerator/codeinsight/GenerateK2QuickFixTests.kt index 18b500cc5862..7b45c9cc1286 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 @@ -140,6 +140,7 @@ internal fun MutableTWorkspace.generateK2FixTests() { model("$idea/quickfix/makeTypeParameterReified", pattern = pattern) model("$idea/quickfix/makeUpperBoundNonNullable", pattern = pattern, isIgnored = true) model("$idea/quickfix/memberVisibilityCanBePrivate", pattern = pattern, isIgnored = true) + model("$idea/quickfix/migration/commasInWhenWithoutArgument", pattern = pattern) model("$idea/quickfix/migration/missingConstructorKeyword", pattern = pattern) model("$idea/quickfix/migration/removeNameFromFunctionExpression", pattern = pattern) model("$idea/quickfix/migration/typeParameterList", pattern = pattern)