Search in sources :

Example 1 with Builder

use of org.eclipse.emf.compare.EMFCompare.Builder 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;
}
Also used : DefaultComparisonFactory(org.eclipse.emf.compare.match.DefaultComparisonFactory) DefaultEqualityHelperFactory(org.eclipse.emf.compare.match.DefaultEqualityHelperFactory) EMFCompare(org.eclipse.emf.compare.EMFCompare) IComparisonFactory(org.eclipse.emf.compare.match.IComparisonFactory) DiffBuilder(org.eclipse.emf.compare.diff.DiffBuilder) Builder(org.eclipse.emf.compare.EMFCompare.Builder) DefaultEqualityHelperFactory(org.eclipse.emf.compare.match.DefaultEqualityHelperFactory) IComparisonFactory(org.eclipse.emf.compare.match.IComparisonFactory) ElementWriterFactory(org.talend.dq.writer.impl.ElementWriterFactory) DefaultComparisonFactory(org.eclipse.emf.compare.match.DefaultComparisonFactory) DQMatchEngineFactory(org.talend.cwm.compare.factory.DQMatchEngineFactory) MatchEngineFactoryRegistryImpl(org.eclipse.emf.compare.match.impl.MatchEngineFactoryRegistryImpl) DQMatchEngineFactory(org.talend.cwm.compare.factory.DQMatchEngineFactory) IEObjectMatcher(org.eclipse.emf.compare.match.eobject.IEObjectMatcher)

Aggregations

EMFCompare (org.eclipse.emf.compare.EMFCompare)1 Builder (org.eclipse.emf.compare.EMFCompare.Builder)1 DiffBuilder (org.eclipse.emf.compare.diff.DiffBuilder)1 DefaultComparisonFactory (org.eclipse.emf.compare.match.DefaultComparisonFactory)1 DefaultEqualityHelperFactory (org.eclipse.emf.compare.match.DefaultEqualityHelperFactory)1 IComparisonFactory (org.eclipse.emf.compare.match.IComparisonFactory)1 IEObjectMatcher (org.eclipse.emf.compare.match.eobject.IEObjectMatcher)1 MatchEngineFactoryRegistryImpl (org.eclipse.emf.compare.match.impl.MatchEngineFactoryRegistryImpl)1 DQMatchEngineFactory (org.talend.cwm.compare.factory.DQMatchEngineFactory)1 ElementWriterFactory (org.talend.dq.writer.impl.ElementWriterFactory)1