From d8ae22e8244020d6240aa79db0b0c152525a8844 Mon Sep 17 00:00:00 2001 From: Roman Golyshev Date: Thu, 14 Mar 2024 21:46:28 +0100 Subject: [PATCH] KTIJ-29015 [Plugin API] Add documentation to the `ExtensionStorage.registerDisposable` --- .../kotlin/compiler/plugin/CompilerPluginRegistrar.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/plugin-api/src/org/jetbrains/kotlin/compiler/plugin/CompilerPluginRegistrar.kt b/compiler/plugin-api/src/org/jetbrains/kotlin/compiler/plugin/CompilerPluginRegistrar.kt index 0537417f3c0..e239d72aa64 100644 --- a/compiler/plugin-api/src/org/jetbrains/kotlin/compiler/plugin/CompilerPluginRegistrar.kt +++ b/compiler/plugin-api/src/org/jetbrains/kotlin/compiler/plugin/CompilerPluginRegistrar.kt @@ -35,8 +35,13 @@ abstract class CompilerPluginRegistrar { } /** - * Passed [disposable] will be called at the end of compilation + * Passed [disposable] will be called when the plugin is no longer needed: + * + * - In the CLI mode: At the end of the compilation process. + * - In the IDE mode: When the whole project is closed, or when the module + * with the corresponding compiler plugin enabled is removed from the project. */ + @Suppress("unused") fun registerDisposable(disposable: PluginDisposable) { _disposables += disposable }