Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO]How CDOResource compare with specified revision?
[CDO]How CDOResource compare with specified revision? [message #658571] Wed, 09 March 2011 03:15 Go to next message
Xingxiao Lu is currently offline Xingxiao LuFriend
Messages: 91
Registered: July 2009
Member
Hi, Eike
Using CDORevisionDeltaUtil.createChangeSetData(Set<CDOID> ids, final CDOBranchPoint startPoint,
final CDOBranchPoint endPoint, final CDORevisionManager revisionManager) can get CDOChangeSetData. But how i can get all of the object's cdoids in CDOResource?

Re: [CDO]How CDOResource compare with specified revision? [message #658577 is a reply to message #658571] Wed, 09 March 2011 05:04 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6446
Registered: July 2009
Senior Member
Hi Xingxiao,

There is no other way than to traverse the resource contents recursively yourself. Each object (including resources) only knows its *direct* container object. In particular the question "does object A *indirectly* contain object B?" can not be answered atomically or deterministically.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper




Am 09.03.2011 04:15, schrieb Xingxiao Lu:
> Hi, Eike
> Using CDORevisionDeltaUtil.createChangeSetData(Set<CDOID> ids, final CDOBranchPoint startPoint,
> final CDOBranchPoint endPoint, final CDORevisionManager revisionManager) can get CDOChangeSetData. But how i can get all of the object's cdoids in CDOResource?
>
>


Re: [CDO]How CDOResource compare with specified revision? [message #658578 is a reply to message #658577] Wed, 09 March 2011 05:40 Go to previous messageGo to next message
Xingxiao Lu is currently offline Xingxiao LuFriend
Messages: 91
Registered: July 2009
Member
Thank you, Eike.
I want to develop a "compare with... (specified revision)" UI for CDOResource. Do you have any good ideas or suggestions?
Re: [CDO]How CDOResource compare with specified revision? [message #658580 is a reply to message #658578] Wed, 09 March 2011 06:02 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6446
Registered: July 2009
Senior Member
Am 09.03.2011 06:40, schrieb Xingxiao Lu:
> Thank you, Eike. I want to develop a "compare with... (specified revision)" UI for CDOResource. Do you have any good ideas or suggestions?
I would probably open audit views at the two times (CDOBranchPoints) you want to compare, add the IDs of all contained objects into a set and then call the method you've already found on CDORevisionDeltaUtil.

Note that there are also methods for the entire graph:

CDOChangeSetData CDOSession.compareRevisions(CDOBranchPoint, CDOBranchPoint)
CDOChangeSetData CDOView.compareRevisions(CDOBranchPoint)

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO]How CDOResource compare with specified revision? [message #658588 is a reply to message #658580] Wed, 09 March 2011 07:27 Go to previous messageGo to next message
Xingxiao Lu is currently offline Xingxiao LuFriend
Messages: 91
Registered: July 2009
Member
Three lists (newObjects, changedObjects, detachedObjects) can be obtained through CDOChangeSetData. My question is how can I get "structured comparison". Sad
Re: [CDO]How CDOResource compare with specified revision? [message #658590 is a reply to message #658588] Wed, 09 March 2011 07:34 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6446
Registered: July 2009
Senior Member
Am 09.03.2011 08:27, schrieb Xingxiao Lu:
> Three lists (newObjects, changedObjects, detachedObjects) can be obtained through CDOChangeSetData. My question is how can I get "structured comparison". :(
Define "structured comparison".

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO]How CDOResource compare with specified revision? [message #658592 is a reply to message #658590] Wed, 09 March 2011 07:51 Go to previous messageGo to next message
Xingxiao Lu is currently offline Xingxiao LuFriend
Messages: 91
Registered: July 2009
Member
I want to develop a comparison UI as EMF Compare.
http://www.eclipse.org/emf/compare/images/screenshot.png
How should I do after I get ChangeSetData of CDOResource?
Re: [CDO]How CDOResource compare with specified revision? [message #658600 is a reply to message #658592] Wed, 09 March 2011 08:29 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6446
Registered: July 2009
Senior Member
Am 09.03.2011 08:51, schrieb Xingxiao Lu:
> I want to develop a comparison UI as EMF Compare.
>
> How should I do after I get ChangeSetData of CDOResource?
Object trees in CDO can grow quite large and deep, so we have focused on a scalable representation of change sets. Mapping these change set infos back to tehe "before" and "after" trees could be done with audit views that provide you with the object trees at those times.

If you develop something flexible and reusable, we might appreciate if you consider to contribute it ;-)

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:Missing EMF Menu Entries
Next Topic:org.eclipse.emf.sdk feature is missing plugin in emf-xsd-Update-2.7.0M5.zip (Indigo)
Goto Forum:
  


Current Time: Sun Oct 20 01:33:47 GMT 2019

Powered by FUDForum. Page generated in 0.01900 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top