Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare] How to get programmatically the number of differences?
[EMF Compare] How to get programmatically the number of differences? [message #96423] Tue, 11 September 2007 04:48 Go to next message
Eclipse UserFriend
Hi,

I am comparing programmatically 2 models and I wish to get the number of
differences between them.
How to get programmatically this information ?

Best regards,
Cyril.
Re: [EMF Compare] How to get programmatically the number of differences? [message #96438 is a reply to message #96423] Tue, 11 September 2007 10:32 Go to previous message
Eclipse UserFriend
Once you compare your two models you get a DiffModel instance, this instance
should contains a DiffGroup for your whole model in the "ownedElements"
reference. The DiffGroup tells you how many subchanges are encapsulated,
basically something like :

((DiffGroup)diff.getOwnedElements().get(0)).getSubchanges();

Will return the number of changes in the diff model.


Cédric


Cyril Faucher wrote:

> Hi,
>
> I am comparing programmatically 2 models and I wish to get the number of
> differences between them.
> How to get programmatically this information ?
>
> Best regards,
> Cyril.
Re: [EMF Compare] How to get programmatically the number of differences? [message #609692 is a reply to message #96423] Tue, 11 September 2007 10:32 Go to previous message
Eclipse UserFriend
Once you compare your two models you get a DiffModel instance, this instance
should contains a DiffGroup for your whole model in the "ownedElements"
reference. The DiffGroup tells you how many subchanges are encapsulated,
basically something like :

((DiffGroup)diff.getOwnedElements().get(0)).getSubchanges();

Will return the number of changes in the diff model.


Cédric


Cyril Faucher wrote:

> Hi,
>
> I am comparing programmatically 2 models and I wish to get the number of
> differences between them.
> How to get programmatically this information ?
>
> Best regards,
> Cyril.
Previous Topic:[EMF Compare] How to get programmatically the number of differences?
Next Topic:Persist EObject from BPEL20.XSD
Goto Forum:
  


Current Time: Sun May 11 23:01:04 EDT 2025

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

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

Back to the top