Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Copare] Diff model description
[Copare] Diff model description [message #102070] Thu, 08 November 2007 22:38 Go to next message
hanys is currently offline hanysFriend
Messages: 188
Registered: July 2009
Senior Member
Hello,

1) Is it possible to provide some documentation of classes from Diff model?
2) What information these classes contains?

3) We have EMF based model instances. We want to compare these 2 models and
show both (differences and also what is same in both models). Is diff model
able to do it. And our model is hierarchical, does this model holds this
hierarchical kind of information (tree like)?

Thanks,
Jan
Re: [Copare] Diff model description [message #102176 is a reply to message #102070] Fri, 09 November 2007 08:35 Go to previous message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
Hi Jan,

answers are following :

> Hello,
>
> 1) Is it possible to provide some documentation of classes from Diff
> model? 2) What information these classes contains?

The diff model is the output of the EMF compare engine, it describe the
changes between the two (or three) compared models. That mean it basically
says : The class "NewClass" has been added, the Package "MyPackage" has
been moved from "rootPackage" to "childPackage" and so on.

The DiffModel contains enough information to merge these differences.

> 3) We have EMF based model instances. We want to compare these 2 models
> and show both (differences and also what is same in both models). Is diff
> model able to do it. And our model is hierarchical, does this model holds
> this hierarchical kind of information (tree like)?

That's exactly a use case of the Diff Model, EMF compare takes two models
let's say v1.uml and v2.uml, produce the match model which says
element "MyClass" in v1.uml is the same as element "MyClass" in v2.uml, and
then produce a DiffModel from that Match Model, saying (for
instance) "Attribute "abstract" in "MyClass" has been changed from "false"
to "true".

And yes, this diff model keeps the hierarchy as much as possible.

Using the UI you can export the comparison as "emfdiff" file (icon at the
top right) and then open the exported file using the "sample reflective
editor", you'll see a "SnapShot" which contains both diff and match model.
You can of course do the same kind of things programmatically



Cédric


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Re: [Copare] Diff model description [message #612413 is a reply to message #102070] Fri, 09 November 2007 08:35 Go to previous message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
Hi Jan,

answers are following :

> Hello,
>
> 1) Is it possible to provide some documentation of classes from Diff
> model? 2) What information these classes contains?

The diff model is the output of the EMF compare engine, it describe the
changes between the two (or three) compared models. That mean it basically
says : The class "NewClass" has been added, the Package "MyPackage" has
been moved from "rootPackage" to "childPackage" and so on.

The DiffModel contains enough information to merge these differences.

> 3) We have EMF based model instances. We want to compare these 2 models
> and show both (differences and also what is same in both models). Is diff
> model able to do it. And our model is hierarchical, does this model holds
> this hierarchical kind of information (tree like)?

That's exactly a use case of the Diff Model, EMF compare takes two models
let's say v1.uml and v2.uml, produce the match model which says
element "MyClass" in v1.uml is the same as element "MyClass" in v2.uml, and
then produce a DiffModel from that Match Model, saying (for
instance) "Attribute "abstract" in "MyClass" has been changed from "false"
to "true".

And yes, this diff model keeps the hierarchy as much as possible.

Using the UI you can export the comparison as "emfdiff" file (icon at the
top right) and then open the exported file using the "sample reflective
editor", you'll see a "SnapShot" which contains both diff and match model.
You can of course do the same kind of things programmatically



Cédric


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Previous Topic:[CDO] mysql support
Next Topic:[Compare] Comparing methods
Goto Forum:
  


Current Time: Sun Apr 14 03:01:46 GMT 2024

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

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

Back to the top