52 | | * Extend the property in ResourceTextModel. Keep internally a list of ResourceRevisions. All the incoming revisions should be added subsequently to that list. In the case when the access to the text resource is a DelegatingServerAccess one, write a new logic for the property - when a change occurs: |
53 | | * Find the last resource revision id in the resource that is contained in our list. |
| 52 | * Extend the property in ResourceTextModel. Keep internally the last processed resourceRevision. All the incoming revisions should be put on the place of the last one. Together with them, make a hash map, mapping revision ids to imm texts. In the case when the access to the text resource is a DelegatingServerAccess one, write a new logic for the property - when a change occurs: |
| 53 | * Find the last resource revision id which is common for the last revision history and the current history. |
| 54 | * In the last revision history, create a reverse change for every change after the found id (if change C is applied to text A and the result is text B, the reverse is the change that applied to text B would create text A). |
| 55 | * In the current revision history, just get all the text changes after the found revision id. |
| 56 | * Get the reversed list of the first changes, then add the list of the second changes. Update the view model with all of them. |