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 use EMF Compare in Java
[EMF Compare] How to use EMF Compare in Java [message #618060] Sat, 17 May 2008 17:33
Lars Schneider is currently offline Lars SchneiderFriend
Messages: 50
Registered: July 2009

I am writing a Model Refactoring for EMF Plugin and I think it would be
great to use EMF Compare as a preview like Eclipse Code Refactoring
does. The problem I am having is how to compare the original resource
with the refactored resource. I need to know how to open a two-way
compare of the two different instances of EObject.

In this newsgroup I already found this snippet but it does not work

EObject eObject1 = ModelUtils.load(model1URI);
EObject eObject2 = ModelUtils.load(model2URI);
final MatchModel match = new MatchService().doMatch(

eObject1, eObject2, new NullProgressMonitor());
final DiffModel diff = new DiffMaker().doDiff(match);

- ModelUtils.load(...) also needs a ResourceSet
- MatchService has no visible constructor
- DiffMaker can not be resolved to a type

Are there tutorials or other code examples available?
Previous Topic:comparison of *.xmi via EMF Compare not possible
Next Topic:[CDO] ideas on a distributed object model
Goto Forum:

Current Time: Tue Mar 31 00:23:31 GMT 2020

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

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

Back to the top