Files
openide/platform/service-container/overview.md
Vladimir Krivosheev 165e3b323c move Light Services docs to plugin sdk docs
GitOrigin-RevId: 3009745ccf8bfc59b48734ab7512650a6b851881
2019-12-20 17:34:00 +00:00

3.1 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 is some project opened or not).

See PreloadingActivity.

To register:

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

Startup Activity

An activity to be executed after project opening.

Executed after project is opened on a background thread with no visible progress indicator and regardless of the current indexing mode. DumbAware is respected currently, but it maybe changed soon.

See StartupActivity. Do not forget to implement DumbAware to indicate that activity can be performed not in EDT and during indexing.

There are two extension points:

  • postStartupActivity
  • backgroundPostStartupActivity Acts as postStartupActivity but executed not immediately after project opening, but with 5 seconds delay.

To register:

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