[EMF Compare] How to use EMF Compare in Java [message #618060] |
Sat, 17 May 2008 17:33 |
Lars Schneider Messages: 50 Registered: July 2009 |
Member |
|
|
Hi,
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
(anymore):
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?
|
|
|
Powered by
FUDForum. Page generated in 0.02777 seconds