Files
openide/platform/service-container/overview.md
Vladimir Krivosheev 57c034677d cleanup
GitOrigin-RevId: 5c058fa10311b99168c60c694ff95df0cfc2cb4d
2021-02-08 10:07:53 +00:00

3.4 KiB

This document is a more like a draft, that will be finally moved to IntelliJ Platform SDK

Service

Please see Service.

To replace (mock) service in tests, use ServiceContainerUtil.

Preloading Activity

An activity to be executed in background on startup (regardless if some project was opened or not).

See PreloadingActivity.

To register:

<extensions defaultExtensionNs="com.intellij">
  <preloadingActivity implementation="com.example.CatPreloadingActivity"/>
</extensions>

Startup Activity

An activity to be executed as part of project opening, on a pooled thread under Loading Project dialog, after ProjectComponent initializations. This extension point can be only used by IJ Platform itself.

To register: StartupManager.registerStartupActivity or

<extensions defaultExtensionNs="com.intellij">
  <startupActivity implementation="com.example.CatStartupActivity"/>
</extensions>

Post Startup Activity

An activity to be executed after project opening.

If activity implements DumbAware, it is executed after project is opened on a background thread with no visible progress indicator and regardless of the current indexing mode. Otherwise, it is executed on EDT and when indexes are ready.

To register: StartupManager.registerPostStartupActivity or

<extensions defaultExtensionNs="com.intellij">
  <postStartupActivity implementation="com.example.CatStartupActivity"/>
</extensions>

See also backgroundPostStartupActivity that acts as postStartupActivity but is executed with 5 seconds delay after project opening.