[LL API] Invalidate code fragment sessions on PSI modifications

Code fragments depend not only on their context module, but also on
body of the context declaration.
This commit is contained in:
Yan Zhulanow
2023-09-20 16:56:32 +09:00
committed by Space Team
parent 1293eb0fab
commit 36df749697
3 changed files with 30 additions and 3 deletions
@@ -15,6 +15,9 @@ import com.intellij.openapi.project.Project
* should keep this limitation in mind and handle it separately. For example, a global modification event should be published for builtins
* and SDK changes.
*
* An empty set is also returned for [KtCodeFragmentModule]s, as no other module can depend on a code fragment.
* Additionally, [KtCodeFragmentModule] are not returned from [getDirectDependents] for their context modules.
*
* Implementations of this provider should ensure that results are provided in reasonable time, for example by caching results, as its
* functions may be called frequently.
*/