KotlinHighLevelFunctionParameterInfoHandler: Strikeout deprecated candidates.

GitOrigin-RevId: b607b385cfa25958c4090d819e4654e04221632a
This commit is contained in:
Mark Punzalan
2022-02-08 08:47:56 +00:00
committed by intellij-monorepo-bot
parent 424cb252d2
commit 77c2ee6c5b
2 changed files with 3 additions and 4 deletions
@@ -115,7 +115,7 @@ abstract class KotlinHighLevelParameterInfoWithCallHandlerBase<TArgumentList : K
}
val candidates = resolvedCall?.targetFunction?.candidates ?: return null
context.itemsToShow = candidates.map { CandidateInfo(it.createPointer()) }.toTypedArray()
context.itemsToShow = candidates.map { CandidateInfo(it.createPointer(), it.deprecationStatus != null) }.toTypedArray()
argumentList
}
@@ -409,8 +409,7 @@ abstract class KotlinHighLevelParameterInfoWithCallHandlerBase<TArgumentList : K
}
val backgroundColor = if (isCallResolvedToCandidate) GREEN_BACKGROUND else context.defaultParameterColor
// TODO: Strikeout if deprecated. Deprecation status not currently in HL API
val strikeout = false
val strikeout = itemToShow.isDeprecated
// Disabled when there are too many arguments.
val allParametersUsed = usedParameterIndices.size == valueParameterCount
@@ -449,6 +448,7 @@ abstract class KotlinHighLevelParameterInfoWithCallHandlerBase<TArgumentList : K
data class CandidateInfo(
val candidate: KtSymbolPointer<KtFunctionLikeSymbol>,
val isDeprecated: Boolean,
var callInfo: CallInfo? = null // Populated in updateParameterInfo()
)
}
@@ -1,4 +1,3 @@
// IGNORE_FIR
@Suppress("DEPRECATED_SINCE_KOTLIN_OUTSIDE_KOTLIN_SUBPACKAGE")
@Deprecated("")
@DeprecatedSinceKotlin(warningSince = "1.0")