mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[Workspace Model] Some fixes of addDiff
GitOrigin-RevId: 8158422d727ed068d119b25ef87d07ce297b4288
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bff45b1fb0
commit
4b03360fb3
@@ -456,7 +456,7 @@ internal class PEntityStorageBuilder(
|
||||
is ChangeEntry.RemoveEntity -> {
|
||||
val outdatedId = change.id
|
||||
val usedPid = replaceMap.getOrDefault(outdatedId, outdatedId)
|
||||
indexes.removeFromIndices(outdatedId)
|
||||
indexes.removeFromIndices(usedPid)
|
||||
if (this.entityDataById(usedPid) != null) {
|
||||
removeEntity(usedPid, replaceMap.inverse())
|
||||
}
|
||||
@@ -473,9 +473,10 @@ internal class PEntityStorageBuilder(
|
||||
val newData = change.newData.clone()
|
||||
newData.id = usedPid.arrayId
|
||||
|
||||
indexes.updateIndices(outdatedId, newData.createPid(), builder)
|
||||
updateChangeLog { it.add(ChangeEntry.ReplaceEntity(newData, updatedChildren, updatedParents)) }
|
||||
// We don't modify entity that isn't exist in this version of storage
|
||||
if (this.entityDataById(usedPid) != null) {
|
||||
indexes.updateIndices(outdatedId, newData.createPid(), builder)
|
||||
updateChangeLog { it.add(ChangeEntry.ReplaceEntity(newData, updatedChildren, updatedParents)) }
|
||||
replaceEntityWithRefs(newData, outdatedId.clazz, updatedChildren, updatedParents)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user