[CMI] Rename CodeMetaInfo.platforms to attributes

This commit is contained in:
Dmitriy Novozhilov
2020-12-02 15:45:06 +03:00
parent ced9a6fe35
commit 3bf60b3acc
7 changed files with 11 additions and 11 deletions
@@ -12,7 +12,7 @@ interface CodeMetaInfo {
val end: Int
val tag: String
val renderConfiguration: AbstractCodeMetaInfoRenderConfiguration
val platforms: MutableList<String>
val attributes: MutableList<String>
fun asString(): String
}
@@ -24,7 +24,7 @@ class DiagnosticCodeMetaInfo(
override val tag: String
get() = renderConfiguration.getTag(this)
override val platforms: MutableList<String> = mutableListOf()
override val attributes: MutableList<String> = mutableListOf()
override fun asString(): String = renderConfiguration.asString(this)
}
@@ -10,7 +10,7 @@ import org.jetbrains.kotlin.codeMetaInfo.renderConfigurations.AbstractCodeMetaIn
class ParsedCodeMetaInfo(
override val start: Int,
override val end: Int,
override val platforms: MutableList<String>,
override val attributes: MutableList<String>,
override val tag: String,
val description: String?
) : CodeMetaInfo {
@@ -32,7 +32,7 @@ abstract class AbstractCodeMetaInfoRenderConfiguration(var renderParams: Boolean
}
protected fun getPlatformsString(codeMetaInfo: CodeMetaInfo): String {
if (codeMetaInfo.platforms.isEmpty()) return ""
return "{${codeMetaInfo.platforms.joinToString(";")}}"
if (codeMetaInfo.attributes.isEmpty()) return ""
return "{${codeMetaInfo.attributes.joinToString(";")}}"
}
}