use of org.talend.cwm.compare.factory.DQMatchEngineFactory in project tdq-studio-se by Talend.
the class AbstractComparisonLevel method createDefaultEMFCompare.
/**
* create a EMFCompare with default configuration.
*
* @return
*/
protected EMFCompare createDefaultEMFCompare() {
// Configure EMF Compare
IEObjectMatcher matcher = ModelElementMatchEngine.createDQEObjectMatcher(UseIdentifiers.NEVER);
DefaultEqualityHelperFactory equalityHelperFactory = new DefaultEqualityHelperFactory();
IComparisonFactory comparisonFactory = new DefaultComparisonFactory(equalityHelperFactory);
IMatchEngine.Factory.Registry matchEngineRegistry = new MatchEngineFactoryRegistryImpl();
// IMatchEngine.Factory.Registry matchEngineRegistry =
// EMFCompareRCPPlugin.getDefault().getMatchEngineFactoryRegistry();
DQMatchEngineFactory matchEngineFactoryImpl = new DQMatchEngineFactory(matcher, comparisonFactory);
matchEngineRegistry.add(matchEngineFactoryImpl);
Builder builder = EMFCompare.builder();
builder.setDiffEngine(diffEngineWithFilter());
EMFCompare comparator = builder.setMatchEngineFactoryRegistry(matchEngineRegistry).build();
return comparator;
}
Aggregations