mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
"
The problem is the following
- The rename happened
- The `TextEditorHighlightingPass` starts highlighting
- `KotlinCodeBlockModificationListener.incModificationCount` is not yet called
- `TextEditorHighlightingPass` goes to some UAST code that uses light classes facades `KtUltraLightClassForFacade`
- The `KtUltraLightClassForFacade` is invalid by that moment as `classes.KtLightClassForFacadeBase.isValid` checks that file name did not change
- As `KtUltraLightClassForFacade` is invalid, `JavaElementPsiSourceWithSmartPointer` cannot restore it from the `SmartPsiElementPointer` so the exception
- `KotlinCodeBlockModificationListener.incModificationCount` may be fired later by 2bc66c1491/community/plugins/kotlin/base/analysis/src/org/jetbrains/kotlin/idea/caches/trackers/KotlinCodeBlockModificationListener.kt) line
The fix fires OOBM on file rename for K1 on `PsiTreeChangeEvent.PROP_FILE_NAME` in `KotlinCodeBlockModificationListener`
IJ-MR-139467
GitOrigin-RevId: eccb45c3527922120bd4a8cacacbbc8b456376a9