mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
ImportPerformer: fix the deprecated API usage
GitOrigin-RevId: e3de1ceca14aeb17acfe7ce76f51b35ea57b5d3b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
eb888e8bdc
commit
f0502bed19
@@ -12,8 +12,6 @@ import com.intellij.openapi.diagnostic.runAndLogException
|
||||
import com.intellij.openapi.extensions.PluginId
|
||||
import com.intellij.openapi.progress.ProgressIndicator
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.rd.util.withSyncIOBackgroundContext
|
||||
import com.intellij.openapi.rd.util.withUiContext
|
||||
import com.intellij.openapi.updateSettings.impl.PluginDownloader
|
||||
import com.intellij.openapi.updateSettings.impl.pluginsAdvertisement.PluginsAdvertiserDialogPluginInstaller
|
||||
import com.intellij.openapi.updateSettings.impl.pluginsAdvertisement.getInstallAndEnableTask
|
||||
@@ -146,7 +144,7 @@ private suspend fun doInstallPlugins(
|
||||
val installationFinished = CompletableDeferred<Boolean>()
|
||||
val installer = createInstaller(installationFinished)
|
||||
|
||||
val installationStarted = withUiContext {
|
||||
val installationStarted = withContext(Dispatchers.EDT) {
|
||||
installer.doInstallPlugins({ true }, pi.modalityState)
|
||||
}
|
||||
|
||||
@@ -167,7 +165,7 @@ private suspend fun doDownloadPlugins(
|
||||
var success: Boolean
|
||||
val operation = PluginInstallOperation(plugins, customPlugins, PluginEnabler.HEADLESS, pi)
|
||||
operation.setAllowInstallWithoutRestart(true)
|
||||
withSyncIOBackgroundContext {
|
||||
withContext(Dispatchers.IO) {
|
||||
operation.run()
|
||||
}
|
||||
success = operation.isSuccess
|
||||
|
||||
Reference in New Issue
Block a user