Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Matching in EMF Compare
Matching in EMF Compare [message #615358] Thu, 31 January 2008 19:37
Renata Roginsky is currently offline Renata RoginskyFriend
Messages: 10
Registered: July 2009
Junior Member
When I remove or change in any way any association in my model, my
elements are not matched any longer. Here is an example.
I take a model and create a copy of it with a different name. In the
copied model I change a class name, a multiplicity of an attribute and
remove an association.
When I use RSM Compare/Merge, I get this delta between two models, which
looks correct (sorry it's a bit long):

Unresolved | Changes related to <<DomainModel>>POCDomain ModelV1<Model>
Unresolved | Add Nominal Currency<Association> to
<<DomainModel>>POCDomain ModelV1<Model>.Packaged Element
Unresolved | Modify <<DomainModel>>POCDomain ModelV1<Model>.Name
from "POCDomain ModelV1" to "POCDomain Model"
Unresolved | Changes related to Instrument<Package>
Unresolved | Add NominalCurrencyNominalCurrency<Property> to
<<identifiable>>InstrumentV1<Class>.Owned Attribute
Unresolved | Modify <<identifiable>>InstrumentV1<Class>.Name
from "InstrumentV1" to "Instrument"
Unresolved | Delete <Literal Unlimited Natural> from Delivery
TypeDelivery Type<Property>.Upper Value
Unresolved | Delete <Literal Integer> from Delivery
TypeDelivery Type<Property>.Lower Value
Unresolved | Changes related to
Instrument<Package>::Instrument High-Level<Diagram>
Unresolved | Add [View]
(<<identifiable>>Instrument<Class>)(<Class>)Nominal Currency<Association>
to Instrument High-Level<Diagram>.Edges
Unresolved | Diagram View
Unresolved | Changes related to Instrument<Package>::Instrument
High-Level<Diagram>
Unresolved | Add [View]
(<<identifiable>>Instrument<Class>)(<Class>)Nominal Currency<Association>
to Instrument High-Level<Diagram>.Edges

When I use EMFCompare my MatchModel for these two models only contains one
match: the Model itself. So in my DiffModel I get one AttributeChange for
the model name (plus all sorts of gmf changes, which I’m not interested
in). It also seems to be inconsistent between different models. For
another model I have, similar changes yield a couple of changes instead of
one. Could you please shed some light? What am I doing wrong? Not sure if
it matters, but my model has a dependency on another model, and some
tracing.

Here is my code (pretty standard I think):

DifferencesServices ds = new DifferencesServices();
Model origModel = getModelFromFile(MODEL_EMX);
Model v1Model = getModelFromFile(MODEL_V1_EMX);
MatchModel match = ds.modelMatch(origModel, v1Model, new
NullProgressMonitor());
DiffMaker dm = new DiffMaker();
DiffModel diffModel = dm.doDiff(match);
Previous Topic:[CDO] examples question
Next Topic:Meaning of AddReferenceValue in EMF Compare
Goto Forum:
  


Current Time: Wed Oct 28 21:13:38 GMT 2020

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

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

Back to the top