mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
init LafManager before calling application starter
GitOrigin-RevId: 9c3340023b0ee7fb9cdc1c013adace8e671b950e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
90fa33fb11
commit
6348100bca
@@ -140,11 +140,11 @@ private suspend fun initServiceContainer(app: ApplicationImpl, pluginSetDeferred
|
||||
}
|
||||
|
||||
private suspend fun preInitApp(app: ApplicationImpl,
|
||||
asyncScope: CoroutineScope,
|
||||
log: Logger,
|
||||
initLafJob: Job,
|
||||
appRegisteredJob: Job,
|
||||
euaTaskDeferred: Deferred<(suspend () -> Boolean)?>?) {
|
||||
asyncScope: CoroutineScope,
|
||||
log: Logger,
|
||||
initLafJob: Job,
|
||||
appRegisteredJob: Job,
|
||||
euaTaskDeferred: Deferred<(suspend () -> Boolean)?>?) {
|
||||
coroutineScope {
|
||||
launch(CoroutineName("critical services preloading")) {
|
||||
preloadCriticalServices(app = app, asyncScope = asyncScope, appRegistered = appRegisteredJob, initLafJob = initLafJob)
|
||||
@@ -176,18 +176,8 @@ private suspend fun preInitApp(app: ApplicationImpl,
|
||||
|
||||
euaTaskDeferred?.await()?.invoke()
|
||||
|
||||
asyncScope.launch {
|
||||
if (!app.isHeadlessEnvironment) {
|
||||
launch(CoroutineName("icons preloading") + Dispatchers.IO) {
|
||||
AsyncProcessIcon.createBig(this)
|
||||
AsyncProcessIcon(this)
|
||||
AnimatedIcon.Blinking(AllIcons.Ide.FatalError)
|
||||
AnimatedIcon.FS()
|
||||
}
|
||||
}
|
||||
|
||||
launch {
|
||||
coroutineScope {
|
||||
loadIconMapping?.join()
|
||||
launch {
|
||||
// used by LafManager
|
||||
app.serviceAsync<UISettings>()
|
||||
@@ -197,16 +187,28 @@ private suspend fun preInitApp(app: ApplicationImpl,
|
||||
}
|
||||
}
|
||||
|
||||
loadIconMapping?.join()
|
||||
|
||||
span("laf initialization", RawSwingDispatcher) {
|
||||
app.serviceAsync<LafManager>()
|
||||
}
|
||||
|
||||
if (!app.isHeadlessEnvironment) {
|
||||
// preload only when LafManager is ready
|
||||
launch {
|
||||
asyncScope.launch {
|
||||
app.serviceAsync<EditorColorsManager>()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!app.isHeadlessEnvironment) {
|
||||
asyncScope.launch(CoroutineName("icons preloading") + Dispatchers.IO) {
|
||||
AsyncProcessIcon.createBig(this)
|
||||
AsyncProcessIcon(this)
|
||||
AnimatedIcon.Blinking(AllIcons.Ide.FatalError)
|
||||
AnimatedIcon.FS()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user