本文整理汇总了Java中org.eclipse.emf.compare.Comparison.setThreeWay方法的典型用法代码示例。如果您正苦于以下问题:Java Comparison.setThreeWay方法的具体用法?Java Comparison.setThreeWay怎么用?Java Comparison.setThreeWay使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.emf.compare.Comparison
的用法示例。
在下文中一共展示了Comparison.setThreeWay方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: diffSoftwareModels
import org.eclipse.emf.compare.Comparison; //导入方法依赖的package包/类
@Override
public Comparison diffSoftwareModels(List<String> differIds, ResourceSet leadingModel,
ResourceSet integrationModel, Map<String, String> diffingOptions) throws DiffingException {
if (differIds.size() == 0) {
throw new DiffingException(String.format(MSG_DIFFER_NOT_SELECTED));
}
Comparison diffModel = CompareFactory.eINSTANCE.createComparison();
diffModel.setThreeWay(false);
for (String differId : differIds) {
Differ differ = DifferRegistry.getInstance().getElementById(differId);
if (differ == null) {
logger.warn("Selected Differ not registered: " + differId);
continue;
}
Comparison partComparisonModel;
try {
partComparisonModel = differ.doDiff(leadingModel, integrationModel, diffingOptions);
diffModel.getMatches().addAll(partComparisonModel.getMatches());
diffModel.getMatchedResources().addAll(partComparisonModel.getMatchedResources());
} catch (DiffingNotSupportedException e) {
logger.info("The differ does not support the provided input");
}
}
return diffModel;
}
示例2: match
import org.eclipse.emf.compare.Comparison; //导入方法依赖的package包/类
@Override
public Comparison match(IComparisonScope scope, Monitor monitor) {
final Notifier left = scope.getLeft();
final Notifier right = scope.getRight();
Comparison comparison = createComparison();
comparison.setThreeWay(false);
match(comparison, scope, left, right, monitor);
return comparison;
}