diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/HintType.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/HintType.kt index 3b40d03e43f1..77cc9be2af4d 100644 --- a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/HintType.kt +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/HintType.kt @@ -11,6 +11,10 @@ import com.intellij.psi.util.PsiTreeUtil import org.jetbrains.annotations.Nls import org.jetbrains.kotlin.idea.base.resources.KotlinBundle import org.jetbrains.kotlin.idea.caches.resolve.safeAnalyze +import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.SHOW_FUNCTION_PARAMETER_TYPES +import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.SHOW_FUNCTION_RETURN_TYPES +import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.SHOW_LOCAL_VARIABLE_TYPES +import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.SHOW_PROPERTY_TYPES import org.jetbrains.kotlin.idea.parameterInfo.* import org.jetbrains.kotlin.idea.quickfix.createFromUsage.callableBuilder.getReturnTypeReference import org.jetbrains.kotlin.idea.util.RangeKtExpressionType.* @@ -26,6 +30,7 @@ import org.jetbrains.kotlin.psi.psiUtil.getStrictParentOfType import org.jetbrains.kotlin.psi.psiUtil.startOffset import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode import org.jetbrains.kotlin.utils.addToStdlib.safeAs +import kotlin.enums.EnumEntries enum class HintType( @Nls private val description: String, @@ -41,7 +46,7 @@ enum class HintType( false ) { override fun provideHintDetails(e: PsiElement): List { - return providePropertyTypeHint(e) + return providePropertyTypeHint(e, SHOW_PROPERTY_TYPES) } override fun isApplicable(e: PsiElement): Boolean = e is KtProperty && e.getReturnTypeReference() == null && !e.isLocal @@ -54,7 +59,7 @@ enum class HintType( false ) { override fun provideHintDetails(e: PsiElement): List { - return providePropertyTypeHint(e) + return providePropertyTypeHint(e, SHOW_LOCAL_VARIABLE_TYPES) } override fun isApplicable(e: PsiElement): Boolean = @@ -72,7 +77,7 @@ enum class HintType( override fun provideHintDetails(e: PsiElement): List { e.safeAs()?.let { namedFunction -> namedFunction.valueParameterList?.let { paramList -> - provideTypeHint(namedFunction, paramList.endOffset)?.let { return listOf(it) } + provideTypeHint(namedFunction, paramList.endOffset, SHOW_FUNCTION_RETURN_TYPES)?.let { return listOf(it) } } } e.safeAs()?.let { expression -> @@ -96,7 +101,7 @@ enum class HintType( override fun provideHintDetails(e: PsiElement): List { (e as? KtParameter)?.let { param -> param.nameIdentifier?.let { ident -> - provideTypeHint(param, ident.endOffset)?.let { return listOf(it) } + provideTypeHint(param, ident.endOffset, SHOW_FUNCTION_PARAMETER_TYPES)?.let { return listOf(it) } } } return emptyList() @@ -218,7 +223,7 @@ enum class HintType( }; companion object { - private val values = values() + private val values: EnumEntries = entries fun resolve(e: PsiElement): List = values.filter { it.isApplicable(e) } @@ -241,14 +246,20 @@ enum class HintType( abstract fun isApplicable(e: PsiElement): Boolean open fun provideHints(e: PsiElement): List = emptyList() open fun provideHintDetails(e: PsiElement): List = - provideHints(e).map { InlayInfoDetails(it, listOf(TextInlayInfoDetail(it.text))) } + provideHints(e).map { InlayInfoDetails(it, listOf(TextInlayInfoDetail(it.text)), NoInlayInfoOption) } val option = Option("SHOW_${this.name}", { this.description }, defaultEnabled) val enabled get() = option.get() } -data class InlayInfoDetails(val inlayInfo: InlayInfo, val details: List, val option: String? = null) +data class InlayInfoDetails(val inlayInfo: InlayInfo, val details: List, val option: InlayInfoOption? = NoInlayInfoOption) + +sealed class InlayInfoOption + +object NoInlayInfoOption: InlayInfoOption() + +class NamedInlayInfoOption(val name: String): InlayInfoOption() sealed class InlayInfoDetail(val text: String) diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/declarative/AbstractKotlinInlayHintsProvider.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/declarative/AbstractKotlinInlayHintsProvider.kt index c9981085f004..ebc4c0e3c6b7 100644 --- a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/declarative/AbstractKotlinInlayHintsProvider.kt +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/declarative/AbstractKotlinInlayHintsProvider.kt @@ -19,6 +19,8 @@ import com.intellij.refactoring.suggested.createSmartPointer import org.jetbrains.kotlin.idea.codeInsight.hints.HintType import org.jetbrains.kotlin.idea.codeInsight.hints.InlayInfoDetail import org.jetbrains.kotlin.idea.codeInsight.hints.InlayInfoDetails +import org.jetbrains.kotlin.idea.codeInsight.hints.NamedInlayInfoOption +import org.jetbrains.kotlin.idea.codeInsight.hints.NoInlayInfoOption import org.jetbrains.kotlin.idea.codeInsight.hints.PsiInlayInfoDetail import org.jetbrains.kotlin.idea.codeInsight.hints.TextInlayInfoDetail import org.jetbrains.kotlin.idea.codeInsight.hints.TypeInlayInfoDetail @@ -46,12 +48,14 @@ abstract class AbstractKotlinInlayHintsProvider(private vararg val hintTypes: Hi resolved.forEach { hintType -> hintType.provideHintDetails(element).forEach { details: InlayInfoDetails -> val inlayInfo: InlayInfo = details.inlayInfo - if (details.option != null) { - sink.whenOptionEnabled(details.option) { - addInlayInfo(sink, inlayInfo, details) + details.option?.let { + when (it) { + is NamedInlayInfoOption -> sink.whenOptionEnabled(it.name) { + addInlayInfo(sink, inlayInfo, details) + } + + NoInlayInfoOption -> addInlayInfo(sink, inlayInfo, details) } - } else { - addInlayInfo(sink, inlayInfo, details) } } } diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/declarative/KotlinLambdasHintsProvider.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/declarative/KotlinLambdasHintsProvider.kt index f56c9b72d703..e42d8f735a0f 100644 --- a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/declarative/KotlinLambdasHintsProvider.kt +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/declarative/KotlinLambdasHintsProvider.kt @@ -2,13 +2,10 @@ package org.jetbrains.kotlin.idea.codeInsight.hints.declarative import org.jetbrains.kotlin.idea.codeInsight.hints.HintType +import org.jetbrains.kotlin.idea.codeInsight.hints.HintType.* +import org.jetbrains.kotlin.idea.codeInsight.hints.NamedInlayInfoOption -class KotlinLambdasHintsProvider : - AbstractKotlinInlayHintsProvider(HintType.LAMBDA_RETURN_EXPRESSION, HintType.LAMBDA_IMPLICIT_PARAMETER_RECEIVER) { +val SHOW_RETURN_EXPRESSIONS = NamedInlayInfoOption("hints.lambda.return") +val SHOW_IMPLICIT_RECEIVERS_AND_PARAMS = NamedInlayInfoOption("hints.lambda.receivers.parameters") - companion object { - const val SHOW_RETURN_EXPRESSIONS = "hints.lambda.return" - const val SHOW_IMPLICIT_RECEIVERS_AND_PARAMS = "hints.lambda.receivers.parameters" - } - -} \ No newline at end of file +class KotlinLambdasHintsProvider : AbstractKotlinInlayHintsProvider(LAMBDA_RETURN_EXPRESSION, LAMBDA_IMPLICIT_PARAMETER_RECEIVER) \ No newline at end of file diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/declarative/KotlinReferencesTypeHintsProvider.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/declarative/KotlinReferencesTypeHintsProvider.kt index 1f7a646660c8..15257c7a317a 100644 --- a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/declarative/KotlinReferencesTypeHintsProvider.kt +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/declarative/KotlinReferencesTypeHintsProvider.kt @@ -2,16 +2,13 @@ package org.jetbrains.kotlin.idea.codeInsight.hints.declarative import org.jetbrains.kotlin.idea.codeInsight.hints.HintType +import org.jetbrains.kotlin.idea.codeInsight.hints.NamedInlayInfoOption + +val SHOW_PROPERTY_TYPES = NamedInlayInfoOption("hints.type.property") +val SHOW_LOCAL_VARIABLE_TYPES = NamedInlayInfoOption("hints.type.variable") +val SHOW_FUNCTION_RETURN_TYPES = NamedInlayInfoOption("hints.type.function.return") +val SHOW_FUNCTION_PARAMETER_TYPES = NamedInlayInfoOption("hints.type.function.parameter") class KotlinReferencesTypeHintsProvider : AbstractKotlinInlayHintsProvider( HintType.PROPERTY_HINT, HintType.LOCAL_VARIABLE_HINT, HintType.FUNCTION_HINT, HintType.PARAMETER_TYPE_HINT -) { - - companion object { - const val SHOW_PROPERTY_TYPES = "hints.type.property" - const val SHOW_LOCAL_VARIABLE_TYPES = "hints.type.variable" - const val SHOW_FUNCTION_RETURN_TYPES = "hints.type.function.return" - const val SHOW_FUNCTION_PARAMETER_TYPES = "hints.type.function.parameter" - } - -} \ No newline at end of file +) \ No newline at end of file diff --git a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/parameterInfo/LambdaImpicitHints.kt b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/parameterInfo/LambdaImpicitHints.kt index ae6c25ac7ee2..b8cee8c4cce8 100644 --- a/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/parameterInfo/LambdaImpicitHints.kt +++ b/plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/parameterInfo/LambdaImpicitHints.kt @@ -8,8 +8,8 @@ import com.intellij.psi.PsiComment import com.intellij.psi.TokenType import org.jetbrains.kotlin.idea.caches.resolve.safeAnalyzeNonSourceRootCode import org.jetbrains.kotlin.idea.codeInsight.hints.InlayInfoDetails -import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.KotlinLambdasHintsProvider import org.jetbrains.kotlin.idea.codeInsight.hints.TextInlayInfoDetail +import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.SHOW_IMPLICIT_RECEIVERS_AND_PARAMS import org.jetbrains.kotlin.psi.KtLambdaExpression import org.jetbrains.kotlin.psi.psiUtil.siblings import org.jetbrains.kotlin.resolve.BindingContext @@ -30,7 +30,7 @@ fun provideLambdaImplicitHints(lambda: KtLambdaExpression): List { +fun providePropertyTypeHint(elem: PsiElement, inlayInfoOption: InlayInfoOption): List { (elem as? KtCallableDeclaration)?.let { property -> property.nameIdentifier?.let { ident -> - provideTypeHint(property, ident.endOffset)?.let { return listOf(it) } + provideTypeHint(property, ident.endOffset, inlayInfoOption)?.let { return listOf(it) } } } return emptyList() } -fun provideTypeHint(element: KtCallableDeclaration, offset: Int): InlayInfoDetails? { +fun provideTypeHint(element: KtCallableDeclaration, offset: Int, inlayInfoOption: InlayInfoOption): InlayInfoDetails? { var type: KotlinType = SpecifyTypeExplicitlyIntention.getTypeForDeclaration(element).unwrap() if (type.containsError()) return null val declarationDescriptor = type.constructor.declarationDescriptor @@ -86,7 +87,7 @@ fun provideTypeHint(element: KtCallableDeclaration, offset: Int): InlayInfoDetai text = "", offset = offset, isShowOnlyIfExistedBefore = false, isFilterByBlacklist = true, relatesToPrecedingText = true ) - return InlayInfoDetails(inlayInfo, listOf(TextInlayInfoDetail(prefix)) + renderedType) + return InlayInfoDetails(inlayInfo, listOf(TextInlayInfoDetail(prefix)) + renderedType, inlayInfoOption) } else { null } diff --git a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/codeInsight/hints/AbstractKotlinLambdasHintsProviderTest.kt b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/codeInsight/hints/AbstractKotlinLambdasHintsProviderTest.kt index 5b37d6c850a9..0cac2a1e33c8 100644 --- a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/codeInsight/hints/AbstractKotlinLambdasHintsProviderTest.kt +++ b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/codeInsight/hints/AbstractKotlinLambdasHintsProviderTest.kt @@ -9,9 +9,9 @@ import com.intellij.platform.testFramework.core.FileComparisonFailedError import com.intellij.testFramework.LightProjectDescriptor import com.intellij.testFramework.utils.inlays.declarative.DeclarativeInlayHintsProviderTestCase import junit.framework.ComparisonFailure -import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.KotlinLambdasHintsProvider.Companion.SHOW_IMPLICIT_RECEIVERS_AND_PARAMS -import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.KotlinLambdasHintsProvider.Companion.SHOW_RETURN_EXPRESSIONS import org.jetbrains.kotlin.idea.base.test.InTextDirectivesUtils +import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.SHOW_IMPLICIT_RECEIVERS_AND_PARAMS +import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.SHOW_RETURN_EXPRESSIONS import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor import org.jetbrains.kotlin.psi.psiUtil.startOffset import java.io.File @@ -43,15 +43,15 @@ abstract class AbstractKotlinLambdasHintsProvider : with(org.jetbrains.kotlin.idea.codeInsight.hints.declarative.KotlinLambdasHintsProvider()) { val fileContents = FileUtil.loadFile(File(fileName), true) val options = buildMap { - put(SHOW_RETURN_EXPRESSIONS, false) - put(SHOW_IMPLICIT_RECEIVERS_AND_PARAMS, false) + put(SHOW_RETURN_EXPRESSIONS.name, false) + put(SHOW_IMPLICIT_RECEIVERS_AND_PARAMS.name, false) when (InTextDirectivesUtils.findStringWithPrefixes(fileContents, "// MODE: ")) { - "return" -> put(SHOW_RETURN_EXPRESSIONS, true) - "receivers_params" -> put(SHOW_IMPLICIT_RECEIVERS_AND_PARAMS, true) + "return" -> put(SHOW_RETURN_EXPRESSIONS.name, true) + "receivers_params" -> put(SHOW_IMPLICIT_RECEIVERS_AND_PARAMS.name, true) "return-&-receivers_params" -> { - put(SHOW_IMPLICIT_RECEIVERS_AND_PARAMS, true) - put(SHOW_RETURN_EXPRESSIONS, true) + put(SHOW_IMPLICIT_RECEIVERS_AND_PARAMS.name, true) + put(SHOW_RETURN_EXPRESSIONS.name, true) } } } diff --git a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/codeInsight/hints/AbstractKotlinReferenceTypeHintsProviderTest.kt b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/codeInsight/hints/AbstractKotlinReferenceTypeHintsProviderTest.kt index d88c182adce7..bfe62f8894de 100644 --- a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/codeInsight/hints/AbstractKotlinReferenceTypeHintsProviderTest.kt +++ b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/codeInsight/hints/AbstractKotlinReferenceTypeHintsProviderTest.kt @@ -12,11 +12,11 @@ import com.intellij.testFramework.LightProjectDescriptor import com.intellij.testFramework.utils.inlays.declarative.DeclarativeInlayHintsProviderTestCase import com.intellij.util.ThrowableRunnable import junit.framework.ComparisonFailure -import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.KotlinReferencesTypeHintsProvider.Companion.SHOW_FUNCTION_PARAMETER_TYPES -import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.KotlinReferencesTypeHintsProvider.Companion.SHOW_FUNCTION_RETURN_TYPES -import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.KotlinReferencesTypeHintsProvider.Companion.SHOW_LOCAL_VARIABLE_TYPES -import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.KotlinReferencesTypeHintsProvider.Companion.SHOW_PROPERTY_TYPES import org.jetbrains.kotlin.idea.base.test.InTextDirectivesUtils +import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.SHOW_FUNCTION_PARAMETER_TYPES +import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.SHOW_FUNCTION_RETURN_TYPES +import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.SHOW_LOCAL_VARIABLE_TYPES +import org.jetbrains.kotlin.idea.codeInsight.hints.declarative.SHOW_PROPERTY_TYPES import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor import org.jetbrains.kotlin.idea.test.runAll import java.io.File @@ -56,20 +56,27 @@ abstract class AbstractKotlinReferenceTypeHintsProviderTest : with(org.jetbrains.kotlin.idea.codeInsight.hints.declarative.KotlinReferencesTypeHintsProvider()) { val fileContents = FileUtil.loadFile(File(fileName), true) val options = buildMap { - put(SHOW_PROPERTY_TYPES, false) - put(SHOW_LOCAL_VARIABLE_TYPES, false) - put(SHOW_FUNCTION_RETURN_TYPES, false) - put(SHOW_FUNCTION_PARAMETER_TYPES, false) + put(SHOW_PROPERTY_TYPES.name, false) + put(SHOW_LOCAL_VARIABLE_TYPES.name, false) + put(SHOW_FUNCTION_RETURN_TYPES.name, false) + put(SHOW_FUNCTION_PARAMETER_TYPES.name, false) when (InTextDirectivesUtils.findStringWithPrefixes(fileContents, "// MODE: ")) { - "function_return" -> put(SHOW_FUNCTION_RETURN_TYPES, true) - "local_variable" -> put(SHOW_LOCAL_VARIABLE_TYPES, true) - "parameter" -> put(SHOW_FUNCTION_PARAMETER_TYPES, true) - "property" -> put(SHOW_PROPERTY_TYPES, true) + "function_return" -> { + put(SHOW_PROPERTY_TYPES.name, true) + put(SHOW_FUNCTION_RETURN_TYPES.name, true) + put(SHOW_LOCAL_VARIABLE_TYPES.name, true) + } + "local_variable" -> put(SHOW_LOCAL_VARIABLE_TYPES.name, true) + "parameter" -> put(SHOW_FUNCTION_PARAMETER_TYPES.name, true) + "property" -> { + put(SHOW_PROPERTY_TYPES.name, true) + put(SHOW_FUNCTION_RETURN_TYPES.name, true) + } "all" -> { - put(SHOW_PROPERTY_TYPES, true) - put(SHOW_LOCAL_VARIABLE_TYPES, true) - put(SHOW_FUNCTION_RETURN_TYPES, true) - put(SHOW_FUNCTION_PARAMETER_TYPES, true) + put(SHOW_PROPERTY_TYPES.name, true) + put(SHOW_LOCAL_VARIABLE_TYPES.name, true) + put(SHOW_FUNCTION_RETURN_TYPES.name, true) + put(SHOW_FUNCTION_PARAMETER_TYPES.name, true) } else -> {} } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/fromLib.kt b/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/fromLib.kt index ed778d8510b2..0c79b77c2343 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/fromLib.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/fromLib.kt @@ -1,6 +1,6 @@ // "Add annotation target" "false" // WITH_STDLIB -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Property types' for 'Types' inlay hints // ACTION: Make internal // ACTION: Specify type explicitly // ERROR: This annotation is not applicable to target 'top level property without backing field or delegate' diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/use-site_field_member_without_backing.kt b/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/use-site_field_member_without_backing.kt index c4c68b3c3213..90cb88546ac0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/use-site_field_member_without_backing.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/use-site_field_member_without_backing.kt @@ -1,5 +1,5 @@ // "Add annotation target" "false" -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Property types' for 'Types' inlay hints // ACTION: Introduce import alias // ACTION: Make internal // ACTION: Make private diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/use-site_field_toplevel_without_backing.kt b/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/use-site_field_toplevel_without_backing.kt index db3f9d70c097..d9a4d9f837f5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/use-site_field_toplevel_without_backing.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addAnnotationTarget/use-site_field_toplevel_without_backing.kt @@ -1,5 +1,5 @@ // "Add annotation target" "false" -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Property types' for 'Types' inlay hints // ACTION: Introduce import alias // ACTION: Make internal // ACTION: Make private diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addElseBranchToIf/withoutCloseParenthesisInCondition.kt b/plugins/kotlin/idea/tests/testData/quickfix/addElseBranchToIf/withoutCloseParenthesisInCondition.kt index 0fdf63b6ba26..6f0ed3dd40ef 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addElseBranchToIf/withoutCloseParenthesisInCondition.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addElseBranchToIf/withoutCloseParenthesisInCondition.kt @@ -1,5 +1,5 @@ // "Add else branch" "false" -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints // ACTION: Replace property initializer with 'if' expression // ERROR: 'if' must have both main and 'else' branches if used as an expression diff --git a/plugins/kotlin/idea/tests/testData/quickfix/addElseBranchToIf/withoutCondition.kt b/plugins/kotlin/idea/tests/testData/quickfix/addElseBranchToIf/withoutCondition.kt index 63ad612793a0..317d743e6da4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/addElseBranchToIf/withoutCondition.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/addElseBranchToIf/withoutCondition.kt @@ -1,5 +1,5 @@ // "Add else branch" "false" -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints // ACTION: Replace property initializer with 'if' expression // ERROR: 'if' must have both main and 'else' branches if used as an expression diff --git a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/returnNotAllowedInClass.kt b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/returnNotAllowedInClass.kt index f26f5a9a1600..06fc68aefd5d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/returnNotAllowedInClass.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/returnNotAllowedInClass.kt @@ -5,7 +5,8 @@ // ACTION: Add braces to all 'if' statements // ACTION: Convert property initializer to getter // ACTION: Convert to lazy property -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints +// ACTION: Enable option 'Property types' for 'Types' inlay hints // ACTION: Move to constructor // WITH_STDLIB fun main() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/returnNotAllowedInObject.kt b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/returnNotAllowedInObject.kt index a38d9cfa3061..999c70f3d016 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/returnNotAllowedInObject.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/changeToLabeledReturn/returnNotAllowedInObject.kt @@ -6,7 +6,8 @@ // ACTION: Add braces to all 'if' statements // ACTION: Convert property initializer to getter // ACTION: Convert to lazy property -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints +// ACTION: Enable option 'Property types' for 'Types' inlay hints // ACTION: Go To Super Property // ACTION: Introduce local variable // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/changeToUseSpreadOperator/differentTypeParameter.kt b/plugins/kotlin/idea/tests/testData/quickfix/changeToUseSpreadOperator/differentTypeParameter.kt index 5757b263f17f..c7d34a8cbf1c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/changeToUseSpreadOperator/differentTypeParameter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/changeToUseSpreadOperator/differentTypeParameter.kt @@ -3,7 +3,7 @@ // ACTION: Change parameter 'x' type of function 'foo' to 'Array' // ACTION: Convert to block body // ACTION: Create function 'foo' -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // DISABLE-ERRORS fun foo(vararg x: String) {} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/changeToUseSpreadOperator/nonArray.kt b/plugins/kotlin/idea/tests/testData/quickfix/changeToUseSpreadOperator/nonArray.kt index 8b3540599f2a..95ae34e382e1 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/changeToUseSpreadOperator/nonArray.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/changeToUseSpreadOperator/nonArray.kt @@ -3,7 +3,7 @@ // ACTION: Change parameter 'x' type of function 'foo' to 'List' // ACTION: Convert to block body // ACTION: Create function 'foo' -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // DISABLE-ERRORS // Fix this test case if https://youtrack.jetbrains.com/issue/KT-12663 is implemented diff --git a/plugins/kotlin/idea/tests/testData/quickfix/changeToUseSpreadOperator/nonVarArg.kt b/plugins/kotlin/idea/tests/testData/quickfix/changeToUseSpreadOperator/nonVarArg.kt index 3e43062ac511..0521b90cf1ce 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/changeToUseSpreadOperator/nonVarArg.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/changeToUseSpreadOperator/nonVarArg.kt @@ -3,7 +3,7 @@ // ACTION: Change parameter 'x' type of function 'foo' to 'Array' // ACTION: Convert to block body // ACTION: Create function 'foo' -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ERROR: Type mismatch: inferred type is Array but String was expected fun foo(x: String) {} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createSecondaryConstructor/groovyConstructor.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createSecondaryConstructor/groovyConstructor.before.Main.kt index 6ea9eca86757..495cdecc9f11 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createSecondaryConstructor/groovyConstructor.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createSecondaryConstructor/groovyConstructor.before.Main.kt @@ -2,7 +2,7 @@ // ERROR: Too many arguments for public constructor G() defined in G // ACTION: Convert to block body // ACTION: Create function 'G' -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Introduce local variable // ACTION: Remove argument diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inProperty3.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inProperty3.kt index 2ffd429df70c..a1a47ae0c170 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inProperty3.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inProperty3.kt @@ -3,7 +3,7 @@ // ACTION: Create class 'T' // ACTION: Create enum 'T' // ACTION: Create interface 'T' -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Property types' for 'Types' inlay hints // ERROR: Unresolved reference: T val a = fun() { val b: T diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/callableRef.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/callableRef.kt index 81d98436d3d6..2a0face282f9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/callableRef.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/localVariable/callableRef.kt @@ -1,7 +1,7 @@ // "Create local variable 'foo'" "false" // ACTION: Add 'f =' to argument // ACTION: Create function 'foo' -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints // ACTION: Rename reference // ERROR: Unresolved reference: foo fun test(f: (Int) -> Int) {} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/callableRef.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/callableRef.kt index f872c3554988..d506c225371a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/callableRef.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/parameter/callableRef.kt @@ -1,7 +1,7 @@ // "Create parameter 'foo'" "false" // ACTION: Add 'f =' to argument // ACTION: Create function 'foo' -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints // ACTION: Rename reference // ERROR: Unresolved reference: foo fun test(f: (Int) -> Int) {} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/callableRef.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/callableRef.kt index 91d0cb504de6..0ee83d916632 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/callableRef.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createVariable/property/callableRef.kt @@ -1,7 +1,7 @@ // "Create property 'foo'" "false" // ACTION: Add 'f =' to argument // ACTION: Create function 'foo' -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints // ACTION: Rename reference // ERROR: Unresolved reference: foo fun test(f: (Int) -> Int) {} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedReturnType.kt b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedReturnType.kt index eed85e4ffb90..99987a4233d5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedReturnType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedReturnType.kt @@ -1,7 +1,7 @@ // "Make 'bar' private" "true" // ACTION: Convert member to extension // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Make 'Data' internal // ACTION: Make 'Data' public // ACTION: Make 'bar' private diff --git a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedReturnType.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedReturnType.kt.after index 5675e1d265ca..235d59150d7b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedReturnType.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/decreaseVisibility/exposedReturnType.kt.after @@ -1,7 +1,7 @@ // "Make 'bar' private" "true" // ACTION: Convert member to extension // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Make 'Data' internal // ACTION: Make 'Data' public // ACTION: Make 'bar' private diff --git a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/constructorUsageWithConflict.kt b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/constructorUsageWithConflict.kt index 33e6f880cf27..e72a8976a1b3 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/constructorUsageWithConflict.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/constructorUsageWithConflict.kt @@ -2,7 +2,7 @@ // ACTION: Compiler warning 'DEPRECATION' options // ACTION: Compiler warning 'TYPEALIAS_EXPANSION_DEPRECATION' options // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Introduce import alias // ACTION: Introduce local variable // ACTION: Replace usages of '``(): Old /* = OldClass */' in whole project 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 2a248cac7f11..8893a542f683 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/transitiveLong.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/deprecatedSymbolUsage/typeAliases/transitiveLong.kt @@ -1,7 +1,7 @@ // "Replace with 'NewClass'" "false" // ACTION: Compiler warning 'TYPEALIAS_EXPANSION_DEPRECATION' options // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Introduce import alias // ACTION: Introduce local variable diff --git a/plugins/kotlin/idea/tests/testData/quickfix/expressions/unsafeCall5.kt b/plugins/kotlin/idea/tests/testData/quickfix/expressions/unsafeCall5.kt index 3cdf5248c4c7..aa985ec3dcb2 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/expressions/unsafeCall5.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/expressions/unsafeCall5.kt @@ -1,6 +1,6 @@ // "Add non-null asserted (!!) call" "false" // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Introduce local variable // ACTION: Replace overloaded operator with function call // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/functionHasComment.kt b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/functionHasComment.kt index 316913b8c321..d01e02068743 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/functionHasComment.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/functionHasComment.kt @@ -3,8 +3,8 @@ // ACTION: Convert to anonymous function // ACTION: Convert to block body // ACTION: Convert to run { ... } -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Introduce local variable // ACTION: Specify explicit lambda signature // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/functionHasMultiStatements.kt b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/functionHasMultiStatements.kt index 024ee499c446..bbc5c0611010 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/functionHasMultiStatements.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/functionHasMultiStatements.kt @@ -3,8 +3,8 @@ // ACTION: Convert to anonymous function // ACTION: Convert to block body // ACTION: Convert to run { ... } -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Introduce local variable // ACTION: Specify explicit lambda signature // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/functionHasNoStatement.kt b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/functionHasNoStatement.kt index f2db03c32c00..8fe6c7e3f9e7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/functionHasNoStatement.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/functionHasNoStatement.kt @@ -4,8 +4,8 @@ // ACTION: Convert to block body // ACTION: Convert to multi-line lambda // ACTION: Convert to run { ... } -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Introduce local variable // ACTION: Specify explicit lambda signature // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/funtionIsUsed.kt b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/funtionIsUsed.kt index 42b7604b2e75..05ae1bb2198a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/funtionIsUsed.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/funtionIsUsed.kt @@ -3,8 +3,8 @@ // ACTION: Convert to anonymous function // ACTION: Convert to block body // ACTION: Convert to multi-line lambda -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Introduce local variable // ACTION: Specify explicit lambda signature // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasComment.kt b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasComment.kt index 5bd05d092ed0..782ccd2be78c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasComment.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasComment.kt @@ -4,8 +4,8 @@ // ACTION: Convert to anonymous function // ACTION: Convert to block body // ACTION: Convert to run { ... } -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Property types' for 'Types' inlay hints // ACTION: Introduce local variable // ACTION: Specify explicit lambda signature // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasMultiStatements.kt b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasMultiStatements.kt index 99b11c81fd75..a790f8e56183 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasMultiStatements.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasMultiStatements.kt @@ -4,8 +4,8 @@ // ACTION: Convert to anonymous function // ACTION: Convert to block body // ACTION: Convert to run { ... } -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Property types' for 'Types' inlay hints // ACTION: Introduce local variable // ACTION: Specify explicit lambda signature // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasNoStatement.kt b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasNoStatement.kt index 69a5c1da5578..1197f764e87e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasNoStatement.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterHasNoStatement.kt @@ -5,8 +5,8 @@ // ACTION: Convert to block body // ACTION: Convert to multi-line lambda // ACTION: Convert to run { ... } -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Property types' for 'Types' inlay hints // ACTION: Introduce local variable // ACTION: Specify explicit lambda signature // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterIsUsed.kt b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterIsUsed.kt index c8abfbd0b429..01a416e99dd9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterIsUsed.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/removeBraces/getterIsUsed.kt @@ -4,8 +4,8 @@ // ACTION: Convert to anonymous function // ACTION: Convert to block body // ACTION: Convert to multi-line lambda -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Property types' for 'Types' inlay hints // ACTION: Introduce local variable // ACTION: Specify explicit lambda signature // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/wrapRun/funtionIsUsed.kt b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/wrapRun/funtionIsUsed.kt index 4caa8698cb57..63f30150ba2f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/wrapRun/funtionIsUsed.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/wrapRun/funtionIsUsed.kt @@ -3,8 +3,8 @@ // ACTION: Convert to anonymous function // ACTION: Convert to block body // ACTION: Convert to multi-line lambda -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Introduce local variable // ACTION: Specify explicit lambda signature // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/wrapRun/getterIsUsed.kt b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/wrapRun/getterIsUsed.kt index 419714bdb305..9c29cbefce2e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/wrapRun/getterIsUsed.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/functionWithLambdaExpressionBody/wrapRun/getterIsUsed.kt @@ -4,8 +4,8 @@ // ACTION: Convert to anonymous function // ACTION: Convert to block body // ACTION: Convert to multi-line lambda -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Property types' for 'Types' inlay hints // ACTION: Introduce local variable // ACTION: Specify explicit lambda signature // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedReturnType.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedReturnType.kt index 7a96ecbad7e4..e7e82dacf3dc 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedReturnType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedReturnType.kt @@ -1,7 +1,7 @@ // "Make 'Data' internal" "true" // ACTION: Convert member to extension // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Make 'Data' internal // ACTION: Make 'Data' public // ACTION: Make 'bar' private diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedReturnType.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedReturnType.kt.after index a299844b0876..3a9bf0249264 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedReturnType.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/exposedReturnType.kt.after @@ -1,7 +1,7 @@ // "Make 'Data' internal" "true" // ACTION: Convert member to extension // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Make 'Data' internal // ACTION: Make 'Data' public // ACTION: Make 'bar' private diff --git a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateMemberToInternalWithExposed.kt b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateMemberToInternalWithExposed.kt index 938eb64484ef..b923ec9fb3ab 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateMemberToInternalWithExposed.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/increaseVisibility/privateMemberToInternalWithExposed.kt @@ -1,7 +1,7 @@ // "Make bar internal" "false" // ACTION: Add names to call arguments // ACTION: Convert to lazy property -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Property types' for 'Types' inlay hints // ACTION: Move to constructor // ERROR: Cannot access 'bar': it is private in 'First' diff --git a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/anonymousFunction.kt b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/anonymousFunction.kt index 2eed496ba69f..d4fcb1e64233 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/anonymousFunction.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/anonymousFunction.kt @@ -1,7 +1,7 @@ // "Make containing function suspend" "false" // ACTION: Convert to run // ACTION: Convert to with -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Property types' for 'Types' inlay hints // DISABLE-ERRORS class A { suspend fun foo() {} diff --git a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/topLevel.kt b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/topLevel.kt index 142c0d007dc0..84a2a987d06b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/topLevel.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/modifiers/suspend/topLevel.kt @@ -1,7 +1,7 @@ // "Make bar suspend" "false" -// ACTION: Convert to lazy property // ACTION: Convert property initializer to getter -// ACTION: Enable 'Types' inlay hints +// ACTION: Convert to lazy property +// ACTION: Enable option 'Property types' for 'Types' inlay hints // ACTION: Introduce import alias // ERROR: Suspend function 'foo' should be called only from a coroutine or another suspend function diff --git a/plugins/kotlin/idea/tests/testData/quickfix/moveReceiverAnnotation/notExtensionVal.kt b/plugins/kotlin/idea/tests/testData/quickfix/moveReceiverAnnotation/notExtensionVal.kt index 3497c0b4da63..254329c5d31f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/moveReceiverAnnotation/notExtensionVal.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/moveReceiverAnnotation/notExtensionVal.kt @@ -1,11 +1,11 @@ // "Move annotation to receiver type" "false" // ERROR: This annotation is not applicable to target 'declaration' and use site target '@receiver' -// ACTION: Make internal -// ACTION: Enable 'Types' inlay hints +// ACTION: Add annotation target +// ACTION: Enable option 'Property types' for 'Types' inlay hints // ACTION: Introduce import alias +// ACTION: Make internal // ACTION: Make private // ACTION: Specify type explicitly -// ACTION: Add annotation target annotation class Ann diff --git a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/noComparison.kt b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/noComparison.kt index b32e67b70360..8ae98856e834 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/noComparison.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/noComparison.kt @@ -1,7 +1,7 @@ // "Replace with safe (?.) call" "false" // ERROR: Operator call corresponds to a dot-qualified call 'p1.compareTo(p2)' which is not allowed on a nullable receiver 'p1'. // ACTION: Add non-null asserted (!!) call -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints // ACTION: Expand boolean expression to 'if else' // ACTION: Flip '>' // ACTION: Replace overloaded operator with function call diff --git a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInLogic.kt b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInLogic.kt index e875beca18c9..d00883cb1f6c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInLogic.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInLogic.kt @@ -1,6 +1,6 @@ // "Replace with safe (?.) call" "false" // ACTION: Add non-null asserted (!!) call -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints // ACTION: Expand boolean expression to 'if else' // ACTION: Flip '>' // ACTION: Replace '&&' with '||' diff --git a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithImplicitReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithImplicitReceiver.kt index 68d2c7c435cf..7c6f144f9b3f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithImplicitReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithImplicitReceiver.kt @@ -1,6 +1,6 @@ // "Replace with safe (?.) call" "false" // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Replace overloaded operator with function call // ACTION: Wrap with '?.let { ... }' call // ERROR: Reference has a nullable type 'String?', use explicit '?.invoke()' to make a function-like call instead diff --git a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithReceiver.kt index 3cd8f96104f9..2c8c7a3bf0a7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithReceiver.kt @@ -1,6 +1,6 @@ // "Replace with safe (?.) call" "false" // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Replace overloaded operator with function call // ACTION: Wrap with '?.let { ... }' call // ERROR: Reference has a nullable type '(String.() -> Unit)?', use explicit '?.invoke()' to make a function-like call instead diff --git a/plugins/kotlin/idea/tests/testData/quickfix/optIn/scripts/withLocalElements/doubleExperementalApi2.kts b/plugins/kotlin/idea/tests/testData/quickfix/optIn/scripts/withLocalElements/doubleExperementalApi2.kts index d4b7fb3f9374..db54cb3f74c2 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/optIn/scripts/withLocalElements/doubleExperementalApi2.kts +++ b/plugins/kotlin/idea/tests/testData/quickfix/optIn/scripts/withLocalElements/doubleExperementalApi2.kts @@ -1,6 +1,6 @@ // "Opt in for 'Library' on 't'" "true" // ACTION: Add '-opt-in=DoubleExperementalApi2.Library' to module light_idea_test_case compiler arguments -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints // ACTION: Opt in for 'Library' in containing file 'doubleExperementalApi2.kts' // ACTION: Opt in for 'Library' on 'bar' // ACTION: Opt in for 'Library' on 't' diff --git a/plugins/kotlin/idea/tests/testData/quickfix/optIn/scripts/withLocalElements/doubleExperementalApi2.kts.after b/plugins/kotlin/idea/tests/testData/quickfix/optIn/scripts/withLocalElements/doubleExperementalApi2.kts.after index 3f15807244a7..5a647f5f3056 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/optIn/scripts/withLocalElements/doubleExperementalApi2.kts.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/optIn/scripts/withLocalElements/doubleExperementalApi2.kts.after @@ -1,6 +1,6 @@ // "Opt in for 'Library' on 't'" "true" // ACTION: Add '-opt-in=DoubleExperementalApi2.Library' to module light_idea_test_case compiler arguments -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints // ACTION: Opt in for 'Library' in containing file 'doubleExperementalApi2.kts' // ACTION: Opt in for 'Library' on 'bar' // ACTION: Opt in for 'Library' on 't' diff --git a/plugins/kotlin/idea/tests/testData/quickfix/platformTypesInspection/nestedNoAssertRuntime.kt b/plugins/kotlin/idea/tests/testData/quickfix/platformTypesInspection/nestedNoAssertRuntime.kt index ca099e868513..49a016c3fdc5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/platformTypesInspection/nestedNoAssertRuntime.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/platformTypesInspection/nestedNoAssertRuntime.kt @@ -2,8 +2,8 @@ // ACTION: Convert function to property // ACTION: Convert to block body // ACTION: Create test -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Specify return type explicitly fun foo() = arrayOf(java.lang.String.valueOf(1)) \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/primitiveCastToConversion/boolean.kt b/plugins/kotlin/idea/tests/testData/quickfix/primitiveCastToConversion/boolean.kt index 12926d4cc63f..c188006aba98 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/primitiveCastToConversion/boolean.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/primitiveCastToConversion/boolean.kt @@ -1,6 +1,6 @@ // "Replace cast with call to 'toInt()'" "false" // ACTION: Compiler warning 'CAST_NEVER_SUCCEEDS' options -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints // WARNING: Cast can never succeed fun foo() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/multiple.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/multiple.kt index 3dd1fda8eb9e..3c6dd88cff5e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/multiple.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/multiple.kt @@ -1,8 +1,8 @@ // "Remove single lambda parameter declaration" "false" // ACTION: Convert to anonymous function // ACTION: Convert to multi-line lambda -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Function parameter types' for 'Types' inlay hints // ACTION: Move lambda argument into parentheses // ACTION: Rename to _ // ACTION: Specify explicit lambda signature diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/propertyWithImplicitType.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/propertyWithImplicitType.kt index b28cc9d9d2e7..321c5ae21881 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/propertyWithImplicitType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeSingleLambdaParameter/propertyWithImplicitType.kt @@ -3,8 +3,8 @@ // ACTION: Convert to anonymous function // ACTION: Convert to apply // ACTION: Convert to multi-line lambda -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints // ACTION: Remove explicit lambda parameter types (may break code) // ACTION: Rename to _ fun test() { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/deledage.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/deledage.kt index 149c659a5e38..b6440fa448f1 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/deledage.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/deledage.kt @@ -1,7 +1,7 @@ // "Safe delete 'something'" "false" // ACTION: Convert function to property // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Go To Super Method // ACTION: Specify return type explicitly diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/javaTriangle.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/javaTriangle.before.Main.kt index 04f6a2ea9fcc..b7bd361b2449 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/javaTriangle.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/javaTriangle.before.Main.kt @@ -2,7 +2,7 @@ // ACTION: Convert function to property // ACTION: Convert member to extension // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Make 'open' // ACTION: Move to companion object // ACTION: Specify return type explicitly diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/javaTriangle2.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/javaTriangle2.before.Main.kt index a8546967c2a6..b17a8c7d796b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/javaTriangle2.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/javaTriangle2.before.Main.kt @@ -2,7 +2,7 @@ // ACTION: Convert function to property // ACTION: Convert member to extension // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Make 'open' // ACTION: Move to companion object // ACTION: Specify return type explicitly diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/javaTriangle3.before.Main.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/javaTriangle3.before.Main.kt index acdc9b0f70f2..7ed1a5e2e342 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/javaTriangle3.before.Main.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/javaTriangle3.before.Main.kt @@ -2,7 +2,7 @@ // ACTION: Convert function to property // ACTION: Convert member to extension // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Go To Overridden Methods // ACTION: Move to companion object // ACTION: Specify return type explicitly diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/triangle.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/triangle.kt index deeaf18e7e50..25a1dd44cf0e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/triangle.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/triangle.kt @@ -2,7 +2,7 @@ // ACTION: Convert function to property // ACTION: Convert member to extension // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Make 'open' // ACTION: Move to companion object // ACTION: Specify return type explicitly diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/triangle2.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/triangle2.kt index f37b65b76eea..3c4ad80ad8d0 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/triangle2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/triangle2.kt @@ -2,7 +2,7 @@ // ACTION: Convert function to property // ACTION: Convert member to extension // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Go To Overridden Methods // ACTION: Move to companion object // ACTION: Specify return type explicitly diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/usedFunAsAlias.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/usedFunAsAlias.kt index a94a2a99f514..25d3b408080f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/usedFunAsAlias.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeUnused/usedFunAsAlias.kt @@ -2,7 +2,7 @@ // ACTION: Convert function to property // ACTION: Convert to block body // ACTION: Create test -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Specify return type explicitly import useMe as used diff --git a/plugins/kotlin/idea/tests/testData/quickfix/removeUnusedParameter/removeUnusedParameterOfPropertySetter.kt b/plugins/kotlin/idea/tests/testData/quickfix/removeUnusedParameter/removeUnusedParameterOfPropertySetter.kt index 09bc94fee887..339726668279 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/removeUnusedParameter/removeUnusedParameterOfPropertySetter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/removeUnusedParameter/removeUnusedParameterOfPropertySetter.kt @@ -1,7 +1,7 @@ // "Remove parameter 'value'" "false" // ACTION: Compiler warning 'UNUSED_PARAMETER' options -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Function parameter types' for 'Types' inlay hints // ACTION: Specify type explicitly class Abacaba { var foo: String diff --git a/plugins/kotlin/idea/tests/testData/quickfix/renameToUnderscore/functionExpressionParameterNoRemoveParameter.kt b/plugins/kotlin/idea/tests/testData/quickfix/renameToUnderscore/functionExpressionParameterNoRemoveParameter.kt index a20b832fae6b..76af034556cf 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/renameToUnderscore/functionExpressionParameterNoRemoveParameter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/renameToUnderscore/functionExpressionParameterNoRemoveParameter.kt @@ -1,8 +1,8 @@ // "Remove parameter 'x'" "false" // ACTION: Add 'block =' to argument // ACTION: Convert parameter to receiver -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Put parameters on separate lines // ACTION: Rename to _ // ACTION: Specify return type explicitly diff --git a/plugins/kotlin/idea/tests/testData/quickfix/reorderParameters/cycle.kt b/plugins/kotlin/idea/tests/testData/quickfix/reorderParameters/cycle.kt index 496ecf0f0530..8fdb9012728e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/reorderParameters/cycle.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/reorderParameters/cycle.kt @@ -1,8 +1,8 @@ // "Reorder parameters" "false" // ACTION: Add '@JvmOverloads' annotation to function 'foo' // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Flip ',' (may change semantics) // ACTION: Put parameters on one line // ACTION: Specify return type explicitly diff --git a/plugins/kotlin/idea/tests/testData/quickfix/reorderParameters/nestedFunction2.kt b/plugins/kotlin/idea/tests/testData/quickfix/reorderParameters/nestedFunction2.kt index 2d4d1ad39e48..180769874f4f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/reorderParameters/nestedFunction2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/reorderParameters/nestedFunction2.kt @@ -1,8 +1,8 @@ // "Reorder parameters" "false" // ACTION: Add '@JvmOverloads' annotation to function 'bar' // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Flip ',' (may change semantics) // ACTION: Put parameters on one line // ACTION: Specify return type explicitly diff --git a/plugins/kotlin/idea/tests/testData/quickfix/smartCastImpossibleInIfThen/ifThenElseMultiStatement.kt b/plugins/kotlin/idea/tests/testData/quickfix/smartCastImpossibleInIfThen/ifThenElseMultiStatement.kt index caf71ae4df4a..bbef31efa597 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/smartCastImpossibleInIfThen/ifThenElseMultiStatement.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/smartCastImpossibleInIfThen/ifThenElseMultiStatement.kt @@ -1,6 +1,6 @@ // "Replace 'if' expression with elvis expression" "false" // ACTION: Add non-null asserted (!!) call -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints // ACTION: Introduce local variable // DISABLE-ERRORS class Test { diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suppress/availability/parameterSuppressForLambdaParameter.kt b/plugins/kotlin/idea/tests/testData/quickfix/suppress/availability/parameterSuppressForLambdaParameter.kt index a356b22b5b52..2da1c994637c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suppress/availability/parameterSuppressForLambdaParameter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suppress/availability/parameterSuppressForLambdaParameter.kt @@ -2,8 +2,8 @@ // ACTION: Convert to anonymous function // ACTION: Convert to lazy property // ACTION: Convert to single-line lambda -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Property types' for 'Types' inlay hints // ACTION: Remove explicit lambda parameter types (may break code) // ACTION: Rename to _ diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/expressionUnsafeCall.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/expressionUnsafeCall.kt index 9e32b62731cf..38900b646336 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/expressionUnsafeCall.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/expressionUnsafeCall.kt @@ -1,7 +1,7 @@ // "Surround with null check" "false" // ACTION: Add non-null asserted (!!) call // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Introduce local variable // ACTION: Replace with safe (?.) call // ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Int? diff --git a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInDeclaration.kt b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInDeclaration.kt index 63b17eeefedb..fbf2eee76070 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInDeclaration.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/surroundWithNullCheck/unsafeCallInDeclaration.kt @@ -1,6 +1,6 @@ // "Surround with null check" "false" // ACTION: Add non-null asserted (!!) call -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints // ACTION: Replace with safe (?.) call // ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String? diff --git a/plugins/kotlin/idea/tests/testData/quickfix/typeAddition/noAddErrorType.kt b/plugins/kotlin/idea/tests/testData/quickfix/typeAddition/noAddErrorType.kt index 25ae648b8629..e441c33b5995 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/typeAddition/noAddErrorType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/typeAddition/noAddErrorType.kt @@ -3,7 +3,7 @@ // ACTION: Convert property initializer to getter // ACTION: Convert property to function // ACTION: Convert to lazy property -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Property types' for 'Types' inlay hints // ACTION: Introduce backing property // ACTION: Move to companion object // ACTION: Specify type explicitly diff --git a/plugins/kotlin/idea/tests/testData/quickfix/typeAddition/noAddErrorType.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/typeAddition/noAddErrorType.kt.after index 03b96a87c0f3..5581a220e6e3 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/typeAddition/noAddErrorType.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/typeAddition/noAddErrorType.kt.after @@ -3,7 +3,7 @@ // ACTION: Convert property initializer to getter // ACTION: Convert property to function // ACTION: Convert to lazy property -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Property types' for 'Types' inlay hints // ACTION: Introduce backing property // ACTION: Move to companion object // ACTION: Specify type explicitly diff --git a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/casts/unsigned.kt b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/casts/unsigned.kt index 2a0d546b82cc..f3b8fb0fc0e9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/casts/unsigned.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/typeMismatch/casts/unsigned.kt @@ -7,7 +7,7 @@ // ACTION: Convert property initializer to getter // ACTION: Convert to lazy property // ACTION: Do not show hints for current method -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Property types' for 'Types' inlay hints fun takeUInt(u: UInt) = 0 diff --git a/plugins/kotlin/idea/tests/testData/quickfix/variables/unusedVariableInDestructuringDeclaration.kt b/plugins/kotlin/idea/tests/testData/quickfix/variables/unusedVariableInDestructuringDeclaration.kt index 197d68385dea..f4d31d7f2397 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/variables/unusedVariableInDestructuringDeclaration.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/variables/unusedVariableInDestructuringDeclaration.kt @@ -1,6 +1,6 @@ // "Remove variable 'one'" "false" -// ACTION: Enable 'Types' inlay hints // ACTION: Enable a trailing comma by default in the formatter +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints // ACTION: Rename to _ // ACTION: Specify all types explicitly in destructuring declaration // ACTION: Specify type explicitly diff --git a/plugins/kotlin/idea/tests/testData/quickfix/when/addRemainingBranchesMissingLeftBracket.kt b/plugins/kotlin/idea/tests/testData/quickfix/when/addRemainingBranchesMissingLeftBracket.kt index c3726fb7107d..52828da8fada 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/when/addRemainingBranchesMissingLeftBracket.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/when/addRemainingBranchesMissingLeftBracket.kt @@ -1,5 +1,5 @@ // "Add remaining branches" "false" -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints // WITH_STDLIB // ERROR: 'when' expression must be exhaustive, add necessary 'is B' branch or 'else' branch instead diff --git a/plugins/kotlin/idea/tests/testData/quickfix/when/addRemainingBranchesMissingRightBracket.kt b/plugins/kotlin/idea/tests/testData/quickfix/when/addRemainingBranchesMissingRightBracket.kt index 2d09f9bc86b6..f0b3a3f16583 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/when/addRemainingBranchesMissingRightBracket.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/when/addRemainingBranchesMissingRightBracket.kt @@ -1,5 +1,5 @@ // "Add remaining branches" "false" -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Local variable types' for 'Types' inlay hints // WITH_STDLIB // ERROR: 'when' expression must be exhaustive, add necessary 'is B' branch or 'else' branch instead diff --git a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/expressionUnsafeCall.kt b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/expressionUnsafeCall.kt index 10cbc88b18fe..f8f514cf2a0a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/expressionUnsafeCall.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/wrapWithSafeLetCall/expressionUnsafeCall.kt @@ -2,7 +2,7 @@ // WITH_STDLIB // ACTION: Add non-null asserted (!!) call // ACTION: Convert to block body -// ACTION: Enable 'Types' inlay hints +// ACTION: Enable option 'Function return types' for 'Types' inlay hints // ACTION: Introduce local variable // ACTION: Replace with safe (?.) call // ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Int?