|
Re: [CDO] Creating diffs & Storing revisions also at Resource level [message #1831738 is a reply to message #1831721] |
Thu, 27 August 2020 17:39 |
|
Ewoud Werkman wrote on Thu, 27 August 2020 15:24Does CDO have a similar compare functionality that I could use, or is that only for comparing CDO-based resources? I recently found EMFDiffMerge, how does that compare to EMFCompare? Anybody any experiences?
No, CDO only has a scalable compare functionality to compare an entire CDO repository between two branch points.
Personally, I have no experiences with EMFDiffMerge.
Ewoud Werkman wrote on Thu, 27 August 2020 15:24When you commit changes to an attribute of an eObject in a resource, you can only see the revisions of this change at the eObject level. Is it possible to also see these changes at the resource-level?
Users can then quickly see what changes are done to a single resource.
What do you mean by "you can only see the revisions of this change"? Are you referring to the History view of Eclipse? If so, then no, there's currently no "aggregation" of changes implemented, except for the entire repository.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Re: [CDO] Creating diffs & Storing revisions also at Resource level [message #1831790 is a reply to message #1831771] |
Sat, 29 August 2020 06:05 |
|
The Resource::modified attribute is transient, so you can't use it to create a new revision of the resource.
Resource.setTrackingModification(true) attaches a CDOModificationTrackingAdapter to the resource and all its contents. This adapter automatically maintains the transient Resource::modified attribute with the help of a CDOLazyContentAdapter. I don't think it's suitable for your purpose, but you could have a look at
org.eclipse.emf.cdo.util.CDOModificationTrackingAdapter to see how changes can be collected for subtrees.
Quote:Should I do this by iterating through all its containing EObjects and query their history and create such an aggregation myself?
Then you would miss the deltas of objects that used to be in the resource but are currently not in it.
Quote:Or can I iterate through the history of the entire repo and somehow filter if it concerns my specific resource?
That sounds more like the solution you want. But of course it's a very time consuming. That's also the reason why CDO doesn't offer an out-of-the-box functionality to create aggregates of changes of subtrees. If you really opt for this approach I would recommend to create the aggregate on the server-side. Otherwise you'd probably load the entire history of the entire repository on the client-side; again for each resource the user selects.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03458 seconds