From 2790fcf4bd5086fa79cc1a3a5a53a7001d5205ed Mon Sep 17 00:00:00 2001 From: Alexey Sedunov Date: Wed, 15 Feb 2017 12:21:51 +0300 Subject: [PATCH] Kotlin Facet: Synchronize version info on opening the configuration editor --- .../kotlin/idea/facet/KotlinFacetEditorGeneralTab.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/idea/src/org/jetbrains/kotlin/idea/facet/KotlinFacetEditorGeneralTab.kt b/idea/src/org/jetbrains/kotlin/idea/facet/KotlinFacetEditorGeneralTab.kt index f3f71cc4af0..093a32b035d 100644 --- a/idea/src/org/jetbrains/kotlin/idea/facet/KotlinFacetEditorGeneralTab.kt +++ b/idea/src/org/jetbrains/kotlin/idea/facet/KotlinFacetEditorGeneralTab.kt @@ -89,6 +89,14 @@ class KotlinFacetEditorGeneralTab( targetPlatformComboBox.addActionListener { updateCompilerConfigurable() } + + val commonCompilerArguments = compilerInfo.commonCompilerArguments + if (configuration != null && commonCompilerArguments != null) { + with(configuration.settings.versionInfo) { + commonCompilerArguments.languageVersion = languageLevel?.versionString + commonCompilerArguments.apiVersion = apiLevel?.versionString + } + } } internal fun updateCompilerConfigurable() {