Wraps syncPublisher() call in KotlinCompilerSettings in a dispose check
Fix ConfigureKotlinTest
This commit is contained in:
+3
-7
@@ -16,9 +16,9 @@
|
||||
|
||||
package org.jetbrains.kotlin.idea.compiler.configuration
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.components.PersistentStateComponent
|
||||
import com.intellij.openapi.components.StoragePathMacros.PROJECT_CONFIG_DIR
|
||||
import com.intellij.openapi.progress.util.BackgroundTaskUtil
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.util.ReflectionUtil
|
||||
import com.intellij.util.messages.Topic
|
||||
@@ -42,9 +42,7 @@ abstract class BaseKotlinCompilerSettings<T : Freezable> protected constructor(p
|
||||
validateNewSettings(value)
|
||||
_settings = value
|
||||
|
||||
ApplicationManager.getApplication().invokeLater {
|
||||
project.messageBus.syncPublisher(KotlinCompilerSettingsListener.TOPIC).settingsChanged(value)
|
||||
}
|
||||
BackgroundTaskUtil.syncPublisher(project, KotlinCompilerSettingsListener.TOPIC).settingsChanged(value)
|
||||
}
|
||||
|
||||
fun update(changer: T.() -> Unit) {
|
||||
@@ -78,9 +76,7 @@ abstract class BaseKotlinCompilerSettings<T : Freezable> protected constructor(p
|
||||
XmlSerializer.deserializeInto(this, state)
|
||||
}
|
||||
|
||||
ApplicationManager.getApplication().invokeLater {
|
||||
project.messageBus.syncPublisher(KotlinCompilerSettingsListener.TOPIC).settingsChanged(settings)
|
||||
}
|
||||
BackgroundTaskUtil.syncPublisher(project, KotlinCompilerSettingsListener.TOPIC).settingsChanged(settings)
|
||||
}
|
||||
|
||||
public override fun clone(): Any = super.clone()
|
||||
|
||||
+2
-6
@@ -40,9 +40,7 @@ abstract class BaseKotlinCompilerSettings<T : Freezable> protected constructor(p
|
||||
validateNewSettings(value)
|
||||
_settings = value
|
||||
|
||||
ApplicationManager.getApplication().invokeLater {
|
||||
project.messageBus.syncPublisher(KotlinCompilerSettingsListener.TOPIC).settingsChanged(value)
|
||||
}
|
||||
BackgroundTaskUtil.syncPublisher(project, KotlinCompilerSettingsListener.TOPIC).settingsChanged(value)
|
||||
}
|
||||
|
||||
fun update(changer: T.() -> Unit) {
|
||||
@@ -76,9 +74,7 @@ abstract class BaseKotlinCompilerSettings<T : Freezable> protected constructor(p
|
||||
XmlSerializer.deserializeInto(this, state)
|
||||
}
|
||||
|
||||
ApplicationManager.getApplication().invokeLater {
|
||||
project.messageBus.syncPublisher(KotlinCompilerSettingsListener.TOPIC).settingsChanged(settings)
|
||||
}
|
||||
BackgroundTaskUtil.syncPublisher(project, KotlinCompilerSettingsListener.TOPIC).settingsChanged(settings)
|
||||
}
|
||||
|
||||
public override fun clone(): Any = super.clone()
|
||||
|
||||
Reference in New Issue
Block a user