diff --git a/idea/resources-en/messages/KotlinBundle.properties b/idea/resources-en/messages/KotlinBundle.properties index 9becd140b7b..e05b7a4dc96 100644 --- a/idea/resources-en/messages/KotlinBundle.properties +++ b/idea/resources-en/messages/KotlinBundle.properties @@ -415,15 +415,7 @@ hints.settings.lambda.receivers.parameters=Implicit receivers and parameters hints.settings.suspending=Suspending calls -hints.title.property.type.disabled=Do not show property type hints -hints.title.locals.type.disabled=Do not show local variable type hints -hints.title.function.type.disabled=Do not show function return type hints -hints.title.parameter.type.disabled=Do not show parameter type hints hints.title.argument.name.enabled=Argument name -hints.title.argument.name.disabled=Do not show argument name hints -hints.title.return.expression.disabled=Do not show lambda return expression hints -hints.title.implicit.parameters.disabled=Do not show hints for implicit receivers and parameters of lambdas -hints.title.suspend.calls.disabled=Do not show hints for suspending calls presentation.text.paren=({0}) presentation.text.in.container.paren=(in {0}) diff --git a/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/HintType.kt b/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/HintType.kt index c9d664301fd..ff0e521e6c6 100644 --- a/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/HintType.kt +++ b/idea/src/org/jetbrains/kotlin/idea/codeInsight/hints/HintType.kt @@ -17,11 +17,10 @@ import org.jetbrains.kotlin.psi.psiUtil.endOffset import org.jetbrains.kotlin.psi.psiUtil.getStrictParentOfType @Suppress("UnstableApiUsage") -enum class HintType(private val showDesc: String, val doNotShowDesc: String, defaultEnabled: Boolean) { +enum class HintType(private val showDesc: String, defaultEnabled: Boolean) { PROPERTY_HINT( KotlinBundle.message("hints.settings.types.property"), - KotlinBundle.message("hints.title.property.type.disabled"), false ) { override fun provideHints(elem: PsiElement): List { @@ -33,7 +32,6 @@ enum class HintType(private val showDesc: String, val doNotShowDesc: String, def LOCAL_VARIABLE_HINT( KotlinBundle.message("hints.settings.types.variable"), - KotlinBundle.message("hints.title.locals.type.disabled"), false ) { override fun provideHints(elem: PsiElement): List { @@ -48,7 +46,6 @@ enum class HintType(private val showDesc: String, val doNotShowDesc: String, def FUNCTION_HINT( KotlinBundle.message("hints.settings.types.return"), - KotlinBundle.message("hints.title.function.type.disabled"), false ) { override fun provideHints(elem: PsiElement): List { @@ -66,7 +63,6 @@ enum class HintType(private val showDesc: String, val doNotShowDesc: String, def PARAMETER_TYPE_HINT( KotlinBundle.message("hints.settings.types.parameter"), - KotlinBundle.message("hints.title.parameter.type.disabled"), false ) { override fun provideHints(elem: PsiElement): List { @@ -83,7 +79,6 @@ enum class HintType(private val showDesc: String, val doNotShowDesc: String, def PARAMETER_HINT( KotlinBundle.message("hints.title.argument.name.enabled"), - KotlinBundle.message("hints.title.argument.name.disabled"), true ) { override fun provideHints(elem: PsiElement): List { @@ -96,7 +91,6 @@ enum class HintType(private val showDesc: String, val doNotShowDesc: String, def LAMBDA_RETURN_EXPRESSION( KotlinBundle.message("hints.settings.lambda.return"), - KotlinBundle.message("hints.title.return.expression.disabled"), true ) { override fun isApplicable(elem: PsiElement) = @@ -110,7 +104,6 @@ enum class HintType(private val showDesc: String, val doNotShowDesc: String, def LAMBDA_IMPLICIT_PARAMETER_RECEIVER( KotlinBundle.message("hints.settings.lambda.receivers.parameters"), - KotlinBundle.message("hints.title.implicit.parameters.disabled"), true ) { override fun isApplicable(elem: PsiElement) = elem is KtFunctionLiteral @@ -125,7 +118,6 @@ enum class HintType(private val showDesc: String, val doNotShowDesc: String, def SUSPENDING_CALL( KotlinBundle.message("hints.settings.suspending"), - KotlinBundle.message("hints.title.suspend.calls.disabled"), false ) { override fun isApplicable(elem: PsiElement) = elem.isNameReferenceInCall() && ApplicationManager.getApplication().isInternal