java - Compilation issue with EMF Compare code -
version of emf compare: 2.1.0 m6 (2013/03/19 17:50)
i trying use standalone compare explained in this guide. below compilation error
the method setmatchengine(imatchengine) undefined type emfcompare.builder for below code
// configure emf compare ieobjectmatcher matcher = defaultmatchengine.createdefaulteobjectmatcher(useidentifiers.never); icomparisonfactory comparisonfactory = new defaultcomparisonfactory(new defaultequalityhelperfactory()); imatchengine matchengine = new defaultmatchengine(matcher, comparisonfactory); emfcompare comparator = emfcompare.builder().setmatchengine(matchengine).build(); i see setmatchengine replaced other api shown in below figure. not sure how specify new matchengine using api.

these apis have changed m6 (the api in final 2.1.0 stage far removals concerned). source of "how use apis" unit tests of emf compare if have code in workspace.
for particular use case, code such:
imatchengine.factory factory = new matchenginefactoryimpl(useidentifiers.never); imatchengine.factory.registry matchengineregistry = new matchenginefactoryregistryimpl(); matchengineregistry .add(factory); emfcompare comparator = emfcompare.builder().setmatchenginefactoryregistry(matchengineregistry).build(); note using default registry (emfcompare.builder().build();) enough in cases... except when can't let emf compare use ids :p.
[edit: small note: have updated wiki accurate information, feedback ;)]
Comments
Post a Comment