modellisteners: clear the fast node finder cache when the child is removed #1132
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes the exception:
java.lang.AssertionError
at jetbrains.mps.smodel.BaseFastNodeFinder$ConceptNodeMap.forget(BaseFastNodeFinder.java:244)
at jetbrains.mps.smodel.BaseFastNodeFinder.removed(BaseFastNodeFinder.java:83)
at jetbrains.mps.smodel.BaseFastNodeFinder$ChangeTracker.nodeRemoved(BaseFastNodeFinder.java:322)
at jetbrains.mps.smodel.event.ModelEventDispatch.fireNodeRemove(ModelEventDispatch.java:155)
at jetbrains.mps.smodel.AttachedNodeOwner.fireNodeRemove(AttachedNodeOwner.java:319)
at jetbrains.mps.smodel.SNode.removeChild(SNode.java:208)
at jetbrains.mps.smodel.SNode.delete(SNode.java:220)
at jetbrains.mps.nodeEditor.selection.NodeRangeSelection$1.doExecute(NodeRangeSelection.java:327)
at jetbrains.mps.editor.runtime.commands.EditorCommand.run(EditorCommand.java:55)
at jetbrains.mps.smodel.WorkbenchModelAccess$UndoContextSetup.run(WorkbenchModelAccess.java:375)
at jetbrains.mps.smodel.ActionDispatcher.dispatch(ActionDispatcher.java:98)
at jetbrains.mps.smodel.ActionDispatcher.lambda$wrap$0(ActionDispatcher.java:135)
at jetbrains.mps.smodel.ActionDispatcher.dispatch(ActionDispatcher.java:98)
at jetbrains.mps.smodel.ActionDispatcher.lambda$wrap$0(ActionDispatcher.java:135)
at jetbrains.mps.smodel.LockRunnable.run(LockRunnable.java:60)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:992)
at jetbrains.mps.smodel.TryRunPlatformWriteHelper.runWrite(TryRunPlatformWriteHelper.java:103)
at jetbrains.mps.smodel.TryRunPlatformWriteHelper.lambda$withPlatformWrite$1(TryRunPlatformWriteHelper.java:96)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:174)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:164)
at jetbrains.mps.smodel.WorkbenchModelAccess.executeCommand(WorkbenchModelAccess.java:310)
at jetbrains.mps.smodel.ProjectModelAccess2.executeCommand(ProjectModelAccess2.java:35)
at jetbrains.mps.nodeEditor.selection.NodeRangeSelection.performDeleteAction(NodeRangeSelection.java:319)
at jetbrains.mps.nodeEditor.selection.NodeRangeSelection.executeAction(NodeRangeSelection.java:225)
at jetbrains.mps.ide.editor.actions.Backspace_Action.doExecute(Backspace_Action.java:58)
at jetbrains.mps.workbench.action.BaseAction.lambda$actionPerformed$2(BaseAction.java:229)
at jetbrains.mps.workbench.action.ActionAccess$EmptyAccess.runWithAccess(ActionAccess.java:58)
at jetbrains.mps.workbench.action.BaseAction.actionPerformed(BaseAction.java:221)
at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:339)
at com.intellij.openapi.keymap.impl.ActionProcessor.performAction(ActionProcessor.java:47)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$myActionProcessor$1.performAction(IdeKeyEventDispatcher.kt:502)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.doPerformActionInner$lambda$5$lambda$4(IdeKeyEventDispatcher.kt:865)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.doPerformActionInner$lambda$5(IdeKeyEventDispatcher.kt:865)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:362)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.doPerformActionInner(IdeKeyEventDispatcher.kt:863)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.access$doPerformActionInner(IdeKeyEventDispatcher.kt:1)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction$intellij_platform_ide_impl(IdeKeyEventDispatcher.kt:587)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.kt:513)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.kt:454)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.kt:447)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.kt:309)
at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.kt:622)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:591)
at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:997)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:997)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:405)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)