
W dniu 16 grudnia 2009 20:16 użytkownik Jasper van de Gronde <th.v.d.gronde@...528...> napisał:
As for the UNDO issue that was raised, I don't know how it is done now, but I don't see why it would become truely more difficult (you just need to keep track of any changes you make).
Right now there are 5 event structures (attribute change, content change, child order change, child creation, child deletion) that are stored as a singly-linked list in response to subtree observer notifications on the root node. There's also a special event structure that marks an undo point. There are some unit tests that verify that undoing the events by walking the list and performing the opposite changes until the next undo point is found yields the original tree.
The main incentive to doing this on the XML tree rather than the SP tree is that the number of event types is limited. Doing this in this way on the SP tree would be cumbersome - every attribute in every class would need a corresponding event structure.
Regards, Krzysztof