mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] Check if editor belongs to project before removing cache
#IJPL-10786 GitOrigin-RevId: d3da33ac2438ff9a74be9c1f4fc1029adc9da25b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5eda5888a3
commit
498848764c
+1
@@ -188,6 +188,7 @@ private class ProjectProblemFileSelectionListenerStartupActivity : ProjectActivi
|
||||
// Remove fragments from the cache once the editor gets released
|
||||
EditorFactory.getInstance().addEditorFactoryListener(object : EditorFactoryListener {
|
||||
override fun editorReleased(event: EditorFactoryEvent) {
|
||||
if (event.editor.project != project) return
|
||||
val virtualFile = FileDocumentManager.getInstance().getFile(event.editor.document) ?: return
|
||||
ReadAction.nonBlocking<Any> {
|
||||
if (!virtualFile.isValid) return@nonBlocking null
|
||||
|
||||
Reference in New Issue
Block a user