From 01ec8b5262706a501b1ba5e8def8df26b72e65db Mon Sep 17 00:00:00 2001 From: Ilya Goncharov Date: Tue, 21 Jul 2020 14:19:38 +0300 Subject: [PATCH] [Gradle, JS] Fix typo and add node js module configurator ^KT-40527 fixed --- .../modulesEditor/CreateModuleOrTargetPopup.kt | 11 +++++++---- .../modulesEditor/ModulesEditorComponent.kt | 2 +- .../modulesEditor/ModulesEditorToolbarDecorator.kt | 2 +- .../ui/secondStep/modulesEditor/NewModuleCreator.kt | 4 ++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/secondStep/modulesEditor/CreateModuleOrTargetPopup.kt b/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/secondStep/modulesEditor/CreateModuleOrTargetPopup.kt index 6d9b6f3b1a4..58c66bdb1d1 100644 --- a/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/secondStep/modulesEditor/CreateModuleOrTargetPopup.kt +++ b/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/secondStep/modulesEditor/CreateModuleOrTargetPopup.kt @@ -18,7 +18,7 @@ import javax.swing.Icon class CreateModuleOrTargetPopup private constructor( private val target: Module?, private val allowMultiplatform: Boolean, - private val allowSinglepaltformJs: Boolean, + private val allowSinglePlatformJs: Boolean, private val allowAndroid: Boolean, private val allowIos: Boolean, private val createTarget: (TargetConfigurator) -> Unit, @@ -42,7 +42,10 @@ class CreateModuleOrTargetPopup private constructor( if (allowMultiplatform) +MppModuleConfigurator +JvmSinglePlatformModuleConfigurator if (allowAndroid) +AndroidSinglePlatformModuleConfigurator - if (allowSinglepaltformJs) +BrowserJsSinglePlatformModuleConfigurator + if (allowSinglePlatformJs) { + +BrowserJsSinglePlatformModuleConfigurator + +NodeJsSinglePlatformModuleConfigurator + } if (allowIos) +IOSSinglePlatformModuleConfigurator } ) { @@ -105,7 +108,7 @@ class CreateModuleOrTargetPopup private constructor( fun create( target: Module?, allowMultiplatform: Boolean, - allowSinglepaltformJs: Boolean, + allowSinglePlatformJs: Boolean, allowAndroid: Boolean, allowIos: Boolean, createTarget: (TargetConfigurator) -> Unit, @@ -113,7 +116,7 @@ class CreateModuleOrTargetPopup private constructor( ) = CreateModuleOrTargetPopup( target = target, allowMultiplatform = allowMultiplatform, - allowSinglepaltformJs = allowSinglepaltformJs, + allowSinglePlatformJs = allowSinglePlatformJs, allowAndroid = allowAndroid, allowIos = allowIos, createTarget = createTarget, diff --git a/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/secondStep/modulesEditor/ModulesEditorComponent.kt b/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/secondStep/modulesEditor/ModulesEditorComponent.kt index fd49d1a507c..2fccac18fe1 100644 --- a/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/secondStep/modulesEditor/ModulesEditorComponent.kt +++ b/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/secondStep/modulesEditor/ModulesEditorComponent.kt @@ -37,7 +37,7 @@ class ModulesEditorComponent( moduleCreator.create( target = null, // The empty tree case allowMultiplatform = isMppProject, - allowSinglepaltformJs = isMppProject, + allowSinglePlatformJs = isMppProject, allowAndroid = isMppProject, allowIos = isMppProject, allModules = value ?: emptyList(), diff --git a/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/secondStep/modulesEditor/ModulesEditorToolbarDecorator.kt b/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/secondStep/modulesEditor/ModulesEditorToolbarDecorator.kt index eb7ab1aa428..b6af06f8c73 100644 --- a/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/secondStep/modulesEditor/ModulesEditorToolbarDecorator.kt +++ b/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/secondStep/modulesEditor/ModulesEditorToolbarDecorator.kt @@ -36,7 +36,7 @@ class ModulesEditorToolbarDecorator( allowMultiplatform = isMultiplatformProject() && isRootModule && allModules.none { it.configurator == MppModuleConfigurator }, - allowSinglepaltformJs = isMultiplatformProject() + allowSinglePlatformJs = isMultiplatformProject() && isRootModule && allModules.none { it.configurator == BrowserJsSinglePlatformModuleConfigurator }, allowAndroid = isRootModule diff --git a/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/secondStep/modulesEditor/NewModuleCreator.kt b/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/secondStep/modulesEditor/NewModuleCreator.kt index 95a24b95d07..b9eb449519a 100644 --- a/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/secondStep/modulesEditor/NewModuleCreator.kt +++ b/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/secondStep/modulesEditor/NewModuleCreator.kt @@ -35,7 +35,7 @@ class NewModuleCreator { fun create( target: Module?, allowMultiplatform: Boolean, - allowSinglepaltformJs: Boolean, + allowSinglePlatformJs: Boolean, allowAndroid: Boolean, allowIos: Boolean, allModules: List, @@ -43,7 +43,7 @@ class NewModuleCreator { ) = CreateModuleOrTargetPopup.create( target = target, allowMultiplatform = allowMultiplatform, - allowSinglepaltformJs = allowSinglepaltformJs, + allowSinglePlatformJs = allowSinglePlatformJs, allowAndroid = allowAndroid, allowIos = allowIos, createTarget = { targetConfigurator ->