Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Is EMF Compare right for this use-case?
Is EMF Compare right for this use-case? [message #621138] Wed, 15 July 2009 17:57
No real name is currently offline No real nameFriend
Messages: 61
Registered: July 2009

I am not sure if EMF Compare is right for my task. I want JUnit-test
T2M-transformations. For this reason, the test creates a model from some
text. Then I need to compare it with a reference-model.

I already implemented it like this:
MatchModel match = MatchService.doMatch(referenceModel,
createdModel, Collections.<String, Object> emptyMap());
DiffModel diff = DiffService.doDiff(match, false);
List<DiffElement> differences = diff.getOwnedElements();

if( differences.size() > 0 ){
Assert.assertTrue("the created model is different from the
reference-model", false);

Unfortunatly, there are differences, even though the model are equal,
except for ID's. But I want to ignore ID's and I just want to know if the
models are "logically" equal.

My simple (UML2-)test-models are:
model 1
<?xml version="1.0" encoding="UTF-8"?>
<uml:Model xmi:version="2.1"
<packagedElement xmi:type="uml:Package" xmi:id="_Wb9ysnFoEd6xJohxLdzz5Q"
<packagedElement xmi:type="uml:Class" xmi:id="_Wb9ys3FoEd6xJohxLdzz5Q"

model 2
<?xml version="1.0" encoding="UTF-8"?>
<uml:Model xmi:version="2.1"
<packagedElement xmi:type="uml:Package" xmi:id="_WcG8oXFoEd6xJohxLdzz5Q"
<packagedElement xmi:type="uml:Class" xmi:id="_WcG8onFoEd6xJohxLdzz5Q"

If I compare these models with the GUI, it says:
"2 change(s) in <Model>"
- "<Package> foo has been added"
- "<Package> foo has been removed"

Is there maybe some kind of mode that I can use, or is EMF Compare the
wrong choice for this task?

thank you
Previous Topic:EMF Compare fails
Next Topic:[EMF Compare] 3 way content match is losing an add?
Goto Forum:

Current Time: Mon Feb 26 19:11:32 GMT 2024

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

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

Back to the top