remove use of GlobalScope.async
This commit is contained in:
parent
5fbd27bd0f
commit
9bbad5a9be
1 changed files with 19 additions and 21 deletions
|
|
@ -175,32 +175,30 @@ class ContinuePluginStartupActivity : StartupActivity, Disposable, DumbAware {
|
|||
}
|
||||
})
|
||||
|
||||
GlobalScope.async(Dispatchers.IO) {
|
||||
val listener =
|
||||
ContinuePluginSelectionListener(
|
||||
ideProtocolClient,
|
||||
coroutineScope
|
||||
)
|
||||
val listener =
|
||||
ContinuePluginSelectionListener(
|
||||
ideProtocolClient,
|
||||
coroutineScope
|
||||
)
|
||||
|
||||
// Reload the WebView
|
||||
continuePluginService?.let { pluginService ->
|
||||
val allModulePaths = ModuleManager.getInstance(project).modules
|
||||
.flatMap { module -> ModuleRootManager.getInstance(module).contentRoots.map { it.path } }
|
||||
.map { Paths.get(it).normalize() }
|
||||
// Reload the WebView
|
||||
continuePluginService?.let { pluginService ->
|
||||
val allModulePaths = ModuleManager.getInstance(project).modules
|
||||
.flatMap { module -> ModuleRootManager.getInstance(module).contentRoots.map { it.path } }
|
||||
.map { Paths.get(it).normalize() }
|
||||
|
||||
val topLevelModulePaths = allModulePaths
|
||||
.filter { modulePath -> allModulePaths.none { it != modulePath && modulePath.startsWith(it) } }
|
||||
.map { it.toString() }
|
||||
val topLevelModulePaths = allModulePaths
|
||||
.filter { modulePath -> allModulePaths.none { it != modulePath && modulePath.startsWith(it) } }
|
||||
.map { it.toString() }
|
||||
|
||||
pluginService.workspacePaths = topLevelModulePaths.toTypedArray()
|
||||
}
|
||||
|
||||
EditorFactory.getInstance().eventMulticaster.addSelectionListener(
|
||||
listener,
|
||||
this@ContinuePluginStartupActivity
|
||||
)
|
||||
pluginService.workspacePaths = topLevelModulePaths.toTypedArray()
|
||||
}
|
||||
|
||||
EditorFactory.getInstance().eventMulticaster.addSelectionListener(
|
||||
listener,
|
||||
this@ContinuePluginStartupActivity
|
||||
)
|
||||
|
||||
val coreMessengerManager = CoreMessengerManager(project, ideProtocolClient)
|
||||
continuePluginService.coreMessengerManager = coreMessengerManager
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue