Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 08:48 Go to next message
Cyril Faucher is currently offline Cyril FaucherFriend
Messages: 63
Registered: July 2009
Member
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 14:32 Go to previous message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
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.


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Re: [EMF Compare] How to get programmatically the number of differences? [message #609692 is a reply to message #96423] Tue, 11 September 2007 14:32 Go to previous message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
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.


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Previous Topic:[EMF Compare] How to get programmatically the number of differences?
Next Topic:Persist EObject from BPEL20.XSD
Goto Forum:
  


Current Time: Thu Apr 25 02:11:03 GMT 2024

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

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

Back to the top