[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:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user