diff --git a/platform/core-api/src/com/intellij/openapi/startup/StartupManager.java b/platform/core-api/src/com/intellij/openapi/startup/StartupManager.java index 66a6b9196a4a..74f2368020bd 100644 --- a/platform/core-api/src/com/intellij/openapi/startup/StartupManager.java +++ b/platform/core-api/src/com/intellij/openapi/startup/StartupManager.java @@ -1,6 +1,7 @@ // Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.openapi.startup; +import com.intellij.openapi.project.DumbAware; import com.intellij.openapi.project.Project; import kotlinx.coroutines.Job; import org.jetbrains.annotations.ApiStatus; @@ -10,39 +11,35 @@ import org.jetbrains.annotations.NotNull; * Allows registering activities that are run during project loading. * * @see ProjectActivity - * @see StartupActivity + * @see IntelliJ Platform Docs */ public abstract class StartupManager { /** - * Returns the startup manager instance for the specified project. - * - * @param project the project for which the instance should be returned. - * @return the startup manager instance. + * @return Startup manager instance for the specified project. */ public static StartupManager getInstance(@NotNull Project project) { return project.getService(StartupManager.class); } /** - * Registers an activity that is performed during project load while the "Loading Project" - * progress bar is displayed. You may NOT access the PSI structures from the activity. + * Registers an activity that is performed during the project load while the "Loading Project" + * progress bar is displayed. + * You may NOT access PSI from this activity. */ @ApiStatus.Internal public abstract void registerStartupActivity(@NotNull Runnable runnable); /** - * @deprecated Use {@link #runAfterOpened}. + * @deprecated Consider using extension point {@link ProjectActivity} instead. */ @Deprecated public abstract void registerPostStartupActivity(@NotNull Runnable runnable); /** - * Registers activity that is executed on pooled thread after project is opened. - * The runnable will be executed in current thread if project is already opened.

- *

- * See docs for details. - *

- * Consider using extension point {@link ProjectActivity}/{@link StartupActivity} instead. + * Registers activity that is executed on pooled thread after the project is opened. + * The runnable will be executed in the current thread if the project is already opened. + * + * @implNote Consider using extension point {@link ProjectActivity} instead. */ @ApiStatus.Internal public abstract void runAfterOpened(@NotNull Runnable runnable); @@ -50,15 +47,15 @@ public abstract class StartupManager { public abstract boolean postStartupActivityPassed(); /** - * Registers activity that is executed after project is opened. + * Registers activity that is executed after the project is opened. * If runnable implements {@link DumbAware}, it will be executed on EDT thread in a non-modal state. * Otherwise, it will be executed on EDT when indexes are ready. *

- * The runnable can be executed immediately if method is called from EDT and project is already opened. - *

+ * The runnable can be executed immediately if the method is called from EDT and the project is already opened. * - * @deprecated Use {@link #runAfterOpened}. + * @deprecated Consider using extension point {@link ProjectActivity} instead. */ + @Deprecated public abstract void runWhenProjectIsInitialized(@NotNull Runnable runnable); @ApiStatus.Internal