From 6eb90c49eda1cbc5522efcbb190ea08487f6e084 Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Tue, 30 Jan 2024 16:43:27 +0100 Subject: [PATCH] disposers.md: Add plugin disposable service example --- topics/basics/disposers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/topics/basics/disposers.md b/topics/basics/disposers.md index d9b41e286..c59cd41d3 100644 --- a/topics/basics/disposers.md +++ b/topics/basics/disposers.md @@ -47,7 +47,7 @@ One of the parent `Disposables` provided by the IntelliJ Platform can be chosen, Use the following guidelines to choose the correct parent: -* For resources required for a plugin's entire lifetime, use an application or project level [service](plugin_services.md). +* For resources required for a plugin's entire lifetime, use an application or project level [service](plugin_services.md). Example: [`PythonPluginDisposable`](%gh-ic%/python/openapi/src/com/jetbrains/python/PythonPluginDisposable.java). * For resources required while a [dialog](dialog_wrapper.md) is displayed, use `DialogWrapper.getDisposable()`. * For resources required while a [tool window](tool_windows.md) tab is displayed, pass your instance implementing `Disposable` to `Content.setDisposer()`. * For resources with a shorter lifetime, create a disposable using `Disposer.newDisposable()` and dispose it manually using `Disposable.dispose()`.