diff --git a/topics/intro/content_updates.md b/topics/intro/content_updates.md index 7f22613a6..303efacf0 100644 --- a/topics/intro/content_updates.md +++ b/topics/intro/content_updates.md @@ -1,7 +1,7 @@ -# Content Updates - +# Content Updates + Notable updates and additions to this documentation. This page lists notable additions and updates to the SDK documentation and [](code_samples.md). @@ -18,6 +18,10 @@ See [GitHub Changelog](https://github.com/JetBrains/intellij-sdk-docs/commits/ma Kotlin Persisting State Component : Add an [example](persisting_state_of_components.md#implementing-the-persistentstatecomponent-interface) of a persistent state component implemented in Kotlin. +Minor Changes and Additions +: +- Add section [](module.md#storing-a-reference-to-a-module). + ### September {#september-23} diff --git a/topics/reference_guide/project_model/module.md b/topics/reference_guide/project_model/module.md index 8dc8884ea..f36cd60a6 100644 --- a/topics/reference_guide/project_model/module.md +++ b/topics/reference_guide/project_model/module.md @@ -113,6 +113,11 @@ String moduleName = module == null ? "Module not found" : module.getName(); * To get the project module to which the specified [PSI element](psi_elements.md) belongs, use the `ModuleUtil.findModuleForPsiElement()` method. +### Storing a reference to a Module + +Use [`ModulePointer`](%gh-ic%/platform/projectModel-api/src/com/intellij/openapi/module/ModulePointer.java) to store a reference to a `Module` by its instance or name. +A removal or rename of the `Module` will be tracked automatically. + ### Accessing Module Roots Information about module roots can be accessed via [`ModuleRootManager`](%gh-ic%/platform/projectModel-api/src/com/intellij/openapi/roots/ModuleRootManager.java).