[PSI] Increment modification stamp on adding imports to 'KtCodeFragment'

LL API incremental analysis depends on modification stamps for files and
declarations. Adding an import directive would modify a modification
stamp of an ordinary KtFile. The same should apply to a KtCodeFragment.
This commit is contained in:
Yan Zhulanow
2023-06-27 13:51:27 +09:00
committed by Space Team
parent 1ca1616528
commit 6156609617
@@ -145,6 +145,7 @@ abstract class KtCodeFragment(
if (contextFile != null) {
if (contextFile.importDirectives.find { it.text == import } == null) {
imports.add(import)
clearCaches() // Increment the modification stamp
}
}
}