From fc9f63d49f752cc46d7185108cc7a37d5c4922fd Mon Sep 17 00:00:00 2001 From: Ilya Kirillov Date: Tue, 17 Dec 2019 16:57:40 +0300 Subject: [PATCH] Wizard: do not allow to create more than one target of each type --- .../projectWizard/moduleConfigurators/TargetConfigurator.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/tools/new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/moduleConfigurators/TargetConfigurator.kt b/libraries/tools/new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/moduleConfigurators/TargetConfigurator.kt index fa4f2fa31bf..7a926d33e4f 100644 --- a/libraries/tools/new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/moduleConfigurators/TargetConfigurator.kt +++ b/libraries/tools/new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/moduleConfigurators/TargetConfigurator.kt @@ -25,7 +25,7 @@ interface SingleCoexistenceTargetConfigurator : TargetConfigurator { other.none { it == this } } -interface SimpleTargetConfigurator : TargetConfigurator { +interface SimpleTargetConfigurator : TargetConfigurator, SingleCoexistenceTargetConfigurator { val moduleSubType: ModuleSubType override val moduleType get() = moduleSubType.moduleType override val id get() = "${moduleSubType.name}Target" @@ -49,7 +49,7 @@ private fun Module.createTargetAccessIr(moduleSubType: ModuleSubType) = ) -interface JsTargetConfigurator : TargetConfigurator { +interface JsTargetConfigurator : TargetConfigurator, SingleCoexistenceTargetConfigurator { override val moduleType: ModuleType get() = ModuleType.js }