mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
(RIDER-107439) Onboarding wizard: fix IDE restart requirement after plugin installation
GitOrigin-RevId: 767011db175b332489534088d83eaee5c40526bf
This commit is contained in:
committed by
intellij-monorepo-bot
parent
93429cdeb6
commit
eb824e8c4c
@@ -585,6 +585,9 @@ class JbImportServiceImpl(private val coroutineScope: CoroutineScope) : JbServic
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether we want the IDE restart after all the plugins are installed.
|
||||
*/
|
||||
private suspend fun installPlugins(
|
||||
alreadyInstalled: Set<PluginId>,
|
||||
toInstall: List<String>,
|
||||
@@ -655,6 +658,9 @@ private suspend fun calculatePluginsToInstall(alreadyInstalled: Set<PluginId>, t
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether we want the IDE restart after all the plugins are installed.
|
||||
*/
|
||||
private suspend fun installPlugin(plugin: IdeaPluginDescriptor): Boolean {
|
||||
val downloader = PluginDownloader.createDownloader(plugin).withErrorsConsumer { problem ->
|
||||
logger.warn("Error while downloading plugin ${plugin.pluginId}: $problem")
|
||||
@@ -663,9 +669,11 @@ private suspend fun installPlugin(plugin: IdeaPluginDescriptor): Boolean {
|
||||
withContext(Dispatchers.IO) {
|
||||
downloader.prepareToInstall(reporter.toBridgeIndicator())
|
||||
}
|
||||
withContext(Dispatchers.EDT + ModalityState.any().asContextElement()) {
|
||||
val appliedWithoutRestart = withContext(Dispatchers.EDT + ModalityState.any().asContextElement()) {
|
||||
downloader.installDynamically(null)
|
||||
}
|
||||
|
||||
!appliedWithoutRestart
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user