mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Revert "[kotlin] fix a case when a user enables and then disables K2 mode, IJ will stay in K2 mode after K2 mode is enabled by default"
This reverts commit 50aa33bc89c923bb15e7689caf056509cfa9741f. To make it possible for KTIJ-30761 to enable K2 by default when it was not disabled by the user GitOrigin-RevId: abea9cdb2274b2439340a9d851c3b39a5a4f56bd
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7b492fd2f5
commit
e752c1c3c7
+4
-8
@@ -158,15 +158,11 @@ class KotlinPluginKindSwitcherController {
|
||||
|
||||
const val USE_K2_PLUGIN_VM_OPTION_PREFIX: @NonNls String = "-D$USE_K2_PLUGIN_PROPERTY_NAME="
|
||||
|
||||
private var useK2Plugin: Boolean
|
||||
get() = VMOptions.readOption(USE_K2_PLUGIN_VM_OPTION_PREFIX, /*effective=*/ false)?.toBoolean() ?: false
|
||||
private var useK2Plugin: Boolean?
|
||||
get() = VMOptions.readOption(USE_K2_PLUGIN_VM_OPTION_PREFIX, /*effective=*/ false)?.toBoolean()
|
||||
set(value) {
|
||||
if (value) {
|
||||
VMOptions.setOption(USE_K2_PLUGIN_VM_OPTION_PREFIX, "true")
|
||||
} else {
|
||||
VMOptions.setOption(USE_K2_PLUGIN_VM_OPTION_PREFIX, null/*null means remove the value*/)
|
||||
}
|
||||
VMOptions.setOption(USE_K2_PLUGIN_VM_OPTION_PREFIX, value?.toString())
|
||||
}
|
||||
|
||||
private fun getPluginKindByVmOptions(): KotlinPluginMode =
|
||||
KotlinPluginMode.of(useK2Plugin = useK2Plugin)
|
||||
KotlinPluginMode.of(useK2Plugin = useK2Plugin == true)
|
||||
|
||||
Reference in New Issue
Block a user