FIR IDE: Remove unnecessary renderAnnotations option

This commit is contained in:
Tianyu Geng
2021-04-29 11:00:17 -07:00
committed by TeamCityServer
parent 417c841f77
commit 7a745cfe5c
3 changed files with 1 additions and 5 deletions
@@ -308,7 +308,6 @@ internal abstract class KtGenerateMembersHandler : AbstractGenerateMembersHandle
typeRendererOptions = KtTypeRendererOptions(
shortQualifiedNames = true,
renderFunctionType = true,
renderAnnotations = false
)
)
}
@@ -7,7 +7,6 @@ package org.jetbrains.kotlin.idea.frontend.api.components
import org.jetbrains.kotlin.idea.frontend.api.symbols.KtSymbol
import org.jetbrains.kotlin.idea.frontend.api.types.KtType
import javax.swing.Icon
/**
* KtType to string renderer options
@@ -25,8 +24,6 @@ data class KtTypeRendererOptions(
* @sample Function0<Int> returns () -> Int
*/
val renderFunctionType: Boolean = true,
val renderAnnotations: Boolean = true,
) {
companion object {
val DEFAULT = KtTypeRendererOptions()
@@ -36,7 +36,7 @@ internal class ConeTypeIdeRenderer(
private var filterExtensionFunctionType: Boolean = false
private fun StringBuilder.renderAnnotationList(annotations: List<FirAnnotationCall>?) {
if (annotations != null && options.renderAnnotations) {
if (annotations != null) {
val filteredExtensionIfNeeded = annotations.applyIf(filterExtensionFunctionType) {
annotations.filterNot { it.toAnnotationClassId() == StandardClassIds.extensionFunctionType }
}