| [news.eclipse.tools.emf] Re: [CDO] CDOSavePoint and rollback question |
|
Sebastian, Comments below... Sebastian Paul schrieb: Hello Kai,That is certainly a good design! It looks similar to the one I suggest in the eDine example applications: http://thegordian.blogspot.com/2009/04/modeling-goes-enterprise.html If your editor contains a ResourceSet that is associated with one or more CDOTransactions I suggest that you register an IListener with these transactions to receive these IEvents: You can react by firing DIRTY events from the editor so that the "*" disappears. As an alternative or addition you can hook up a CDOTransactionHandler that gives access to more finegrained transaction and commit/rollback info with the possibility to veto some of the events. See the implementations that we provide for examples. Btw. the opposite direction should work out of the box: Workbench save action causes commit on all CDOTransactions associated with the editors ResourceSet. In applications where commit is equivalent to saving the document, above approach would not be appropriate. A real nested, isolated transaction would be fine for that, but I don't think CDO will support that.Some time ago we decided not to support nested transactions. I can't remember the reasons anymore. I think it was related with difficulties to come up with a concise API for this. Cheers /Eike ---- http://thegordian.blogspot.com |