From 57c71058b001bf072e13141b0ec1fde345131fba Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Wed, 5 Sep 2018 19:06:57 +0300 Subject: [PATCH] Use IdePlatform instead of IdePlatformKind in 'Kotlin Facet' project structure tab Original commit: 2ec1a89fa1280535547e7f3be32322f132b0dcb5 --- .../src/org/jetbrains/kotlin/platform/IdePlatform.kt | 5 +++-- .../src/org/jetbrains/kotlin/platform/IdePlatformKind.kt | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/jps/jps-common/src/org/jetbrains/kotlin/platform/IdePlatform.kt b/jps/jps-common/src/org/jetbrains/kotlin/platform/IdePlatform.kt index 18c341d2f5b..00abe124cbd 100644 --- a/jps/jps-common/src/org/jetbrains/kotlin/platform/IdePlatform.kt +++ b/jps/jps-common/src/org/jetbrains/kotlin/platform/IdePlatform.kt @@ -7,14 +7,15 @@ package org.jetbrains.kotlin.platform import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments import org.jetbrains.kotlin.config.TargetPlatformVersion +import org.jetbrains.kotlin.utils.DescriptionAware -abstract class IdePlatform, Arguments : CommonCompilerArguments> { +abstract class IdePlatform, Arguments : CommonCompilerArguments> : DescriptionAware { abstract val kind: Kind abstract val version: TargetPlatformVersion abstract fun createArguments(init: Arguments.() -> Unit = {}): Arguments - val description + override val description get() = kind.name + " " + version.description override fun toString() = description diff --git a/jps/jps-common/src/org/jetbrains/kotlin/platform/IdePlatformKind.kt b/jps/jps-common/src/org/jetbrains/kotlin/platform/IdePlatformKind.kt index a22ddd36636..a0cb990fa63 100644 --- a/jps/jps-common/src/org/jetbrains/kotlin/platform/IdePlatformKind.kt +++ b/jps/jps-common/src/org/jetbrains/kotlin/platform/IdePlatformKind.kt @@ -27,6 +27,8 @@ abstract class IdePlatformKind> { override fun equals(other: Any?): Boolean = javaClass == other?.javaClass override fun hashCode(): Int = javaClass.hashCode() + override fun toString() = name + companion object { // We can't use the ApplicationExtensionDescriptor class directly because it's missing in the JPS process private val extension = ApplicationManager.getApplication()?.let {