Use IdePlatform instead of IdePlatformKind in 'Kotlin Facet' project structure tab

Original commit: 2ec1a89fa1
This commit is contained in:
Yan Zhulanow
2018-09-05 19:06:57 +03:00
parent 438c370fec
commit 57c71058b0
2 changed files with 5 additions and 2 deletions
@@ -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<Kind : IdePlatformKind<Kind>, Arguments : CommonCompilerArguments> {
abstract class IdePlatform<Kind : IdePlatformKind<Kind>, 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
@@ -27,6 +27,8 @@ abstract class IdePlatformKind<Kind : IdePlatformKind<Kind>> {
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 {