Skip to content

Commit

Permalink
dynamic_plugins.md: Mention clearing UserDataHolder and link an example
Browse files Browse the repository at this point in the history
  • Loading branch information
karollewandowski committed Jun 21, 2024
1 parent 1452913 commit a879def
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion topics/basics/plugin_structure/dynamic_plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ Replace with `String` from `Language.getID()`/`FileType.getName()` (use inspecti

Register [`DynamicPluginListener`](%gh-ic%/platform/core-api/src/com/intellij/ide/plugins/DynamicPluginListener.kt) [application listener](plugin_listeners.md) to receive updates on plugin load/unload events.

This can be used to, for example, cancel long-running activities or disallow unloading due to ongoing processes.
This can be used to, for example:
- cancel long-running activities or disallow unloading due to ongoing processes
- clearing data from `UserDataHolder` objects (see `clearInjectorCache()` and `dropFileCaches()` in [`InjectedLanguageManagerImpl`](%gh-ic%/platform/analysis-impl/src/com/intellij/psi/impl/source/tree/injected/InjectedLanguageManagerImpl.java))
- and similar cases

### Resource Cleanup

Expand Down

0 comments on commit a879def

Please sign in to comment.