diff --git a/topics/basics/ide_infrastructure.md b/topics/basics/ide_infrastructure.md index ddbc328d1..700acce69 100644 --- a/topics/basics/ide_infrastructure.md +++ b/topics/basics/ide_infrastructure.md @@ -106,7 +106,7 @@ Use [`RunOnceUtil`](upsource:///platform/core-api/src/com/intellij/ide/util/RunO ## Application Events Application lifecycle events can be tracked via [`AppLifecycleListener`](upsource:///platform/platform-impl/src/com/intellij/ide/AppLifecycleListener.java) [listener](plugin_listeners.md). -See also [](plugin_components.md#application-startup) and [](plugin_components.md#application-project-close). +See also [](plugin_components.md#application-startup) and [](plugin_components.md#project-and-application-close). Register [`ApplicationActivationListener`](upsource:///platform/ide-core/src/com/intellij/openapi/application/ApplicationActivationListener.java) [listener](plugin_listeners.md) to be notified of "application focused/unfocused" events. diff --git a/topics/basics/plugin_structure/plugin_components.md b/topics/basics/plugin_structure/plugin_components.md index 05bee341a..5cb180452 100644 --- a/topics/basics/plugin_structure/plugin_components.md +++ b/topics/basics/plugin_structure/plugin_components.md @@ -54,6 +54,6 @@ Access to indices must be wrapped with `DumbService`, see also [General Threadin See also [Running Tasks Once](ide_infrastructure.md). -### Application/Project Close +### Project and Application Close To execute code on project closing or application shutdown, implement the `Disposable` interface in a [Service](plugin_services.md) and place the code in the `dispose()` method. Alternatively, use `Disposer.register()` passing a `Project` or `Application` service instance as the `parent` argument (see [Choosing a Disposable Parent](disposers.md#choosing-a-disposable-parent)).