mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[plugins] IJPL-248728 startup plugin errors notification: launch enable/disable action on EDT instead of RawSwingDispatcher
RawSwingDispatcher is treated as `any` modality and causes write-unsafe context errors GitOrigin-RevId: aac0cf2e53cf84da6badf157661d0acd35dd7670
This commit is contained in:
committed by
intellij-monorepo-bot
parent
51b40c7c2c
commit
005f2c483c
+4
-3
@@ -1,7 +1,8 @@
|
||||
// Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.ide.plugins
|
||||
|
||||
import com.intellij.util.ui.RawSwingDispatcher
|
||||
import com.intellij.openapi.application.EDT
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import org.jetbrains.annotations.Nls
|
||||
@@ -34,7 +35,7 @@ class DefaultPluginInitializationErrorHandler : PluginInitializationErrorHandler
|
||||
}
|
||||
|
||||
override suspend fun enableDeferredPlugins() {
|
||||
withContext(RawSwingDispatcher) {
|
||||
withContext(Dispatchers.EDT) {
|
||||
if (pluginEnabler.enable(findDescriptors(pluginsToEnableDisable.first, markedForLoading = true))) {
|
||||
PluginManagerMain.notifyPluginsUpdated(null)
|
||||
}
|
||||
@@ -42,7 +43,7 @@ class DefaultPluginInitializationErrorHandler : PluginInitializationErrorHandler
|
||||
}
|
||||
|
||||
override suspend fun disableDeferredPlugins() {
|
||||
withContext(RawSwingDispatcher) {
|
||||
withContext(Dispatchers.EDT) {
|
||||
pluginEnabler.disable(findDescriptors(pluginsToEnableDisable.second, markedForLoading = false))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user