plugin_components.md: minor

This commit is contained in:
Yann Cébron 2023-03-29 17:05:07 +02:00
parent 1bad536b5c
commit afe5aa2d34

View File

@ -1,13 +1,13 @@
[//]: # (title: Components)
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Components
<link-summary>Migrating deprecated plugin components to the current solutions.</link-summary>
> When writing new plugins, creating Components should be avoided.
> Any existing Components should be migrated to services, extensions, or listeners (see below).
>
{style="warning"}
{style="warning" title="Deprecation Notice"}
Plugin Components are a legacy feature supported for compatibility with plugins created for older versions of the IntelliJ Platform.
Plugins using Components do not support [dynamic loading](dynamic_plugins.md) (the ability to install, update, and uninstall plugins without restarting the IDE).
@ -59,5 +59,5 @@ See also [](ide_infrastructure.md#running-tasks-once).
### 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.
To execute code on project closing or application shutdown, implement the [`Disposable`](%gh-ic%/platform/util/src/com/intellij/openapi/Disposable.java) 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)).