mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
BookmarksStartupActivity - use serviceAsync
GitOrigin-RevId: 33239ea312bd9429a9fc7b2f0f3a5ac38bd3b143
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f96bd4d17b
commit
adaea4e8fb
@@ -1,15 +1,20 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.ide.bookmark
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.components.serviceAsync
|
||||
import com.intellij.openapi.extensions.ExtensionNotApplicableException
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.startup.ProjectActivity
|
||||
|
||||
internal class BookmarksStartupActivity : ProjectActivity {
|
||||
override suspend fun execute(project: Project) {
|
||||
private class BookmarksStartupActivity : ProjectActivity {
|
||||
init {
|
||||
if (ApplicationManager.getApplication().isHeadlessEnvironment) {
|
||||
return
|
||||
throw ExtensionNotApplicableException.create()
|
||||
}
|
||||
BookmarksManager.getInstance(project)
|
||||
}
|
||||
|
||||
override suspend fun execute(project: Project) {
|
||||
project.serviceAsync<BookmarksManager>()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user