diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/compiler/configuration/BaseKotlinCompilerSettings.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/compiler/configuration/BaseKotlinCompilerSettings.kt index 5759b09ac4e..1116546d5de 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/compiler/configuration/BaseKotlinCompilerSettings.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/compiler/configuration/BaseKotlinCompilerSettings.kt @@ -21,8 +21,7 @@ import com.intellij.openapi.components.StoragePathMacros.PROJECT_CONFIG_DIR import com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters import com.intellij.util.xmlb.XmlSerializer import org.jdom.Element -import org.jetbrains.kotlin.cli.common.arguments.collectFieldsToCopy -import org.jetbrains.kotlin.cli.common.arguments.copyBean +import org.jetbrains.kotlin.cli.common.arguments.* import org.jetbrains.kotlin.config.SettingConstants abstract class BaseKotlinCompilerSettings protected constructor() : PersistentStateComponent, Cloneable { @@ -67,9 +66,9 @@ abstract class BaseKotlinCompilerSettings protected constructor() : Per const val KOTLIN_COMPILER_SETTINGS_PATH = PROJECT_CONFIG_DIR + "/" + SettingConstants.KOTLIN_COMPILER_SETTINGS_FILE private val SKIP_DEFAULT_VALUES = SkipDefaultValuesSerializationFilters( - KotlinCommonCompilerArgumentsHolder.createDefaultArguments(), - Kotlin2JvmCompilerArgumentsHolder.createDefaultArguments(), - Kotlin2JsCompilerArgumentsHolder.createDefaultArguments() + CommonCompilerArguments.DummyImpl(), + K2JVMCompilerArguments(), + K2JSCompilerArguments() ) } } diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/compiler/configuration/Kotlin2JsCompilerArgumentsHolder.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/compiler/configuration/Kotlin2JsCompilerArgumentsHolder.kt index b61c68287b0..5291682b369 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/compiler/configuration/Kotlin2JsCompilerArgumentsHolder.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/compiler/configuration/Kotlin2JsCompilerArgumentsHolder.kt @@ -26,7 +26,7 @@ import org.jetbrains.kotlin.idea.compiler.configuration.BaseKotlinCompilerSettin storages = arrayOf(Storage(file = StoragePathMacros.PROJECT_FILE), Storage(file = KOTLIN_COMPILER_SETTINGS_PATH, scheme = StorageScheme.DIRECTORY_BASED))) class Kotlin2JsCompilerArgumentsHolder : BaseKotlinCompilerSettings() { - override fun createSettings() = createDefaultArguments() + override fun createSettings() = K2JSCompilerArguments() override fun validateNewSettings(settings: K2JSCompilerArguments) { validateInheritedFieldsUnchanged(settings) @@ -35,6 +35,5 @@ class Kotlin2JsCompilerArgumentsHolder : BaseKotlinCompilerSettings() { - override fun createSettings() = createDefaultArguments() + override fun createSettings() = K2JVMCompilerArguments() override fun validateNewSettings(settings: K2JVMCompilerArguments) { validateInheritedFieldsUnchanged(settings) @@ -34,7 +34,5 @@ class Kotlin2JvmCompilerArgumentsHolder : BaseKotlinCompilerSettings(project, KotlinCommonCompilerArgumentsHolder::class.java)!! - - fun createDefaultArguments(): CommonCompilerArguments = CommonCompilerArguments.DummyImpl() } }