Class PredefinedMdObjectMatcher
java.lang.Object
com._1c.g5.v8.dt.compare.matching.AbstractElementsTreeMatcher
com._1c.g5.v8.dt.md.compare.matching.PredefinedMdObjectMatcher
- All Implemented Interfaces:
IElementsTreeMatcher
Matcher of predefined elements of md-objects.
-
Constructor Summary
ConstructorsConstructorDescriptionPredefinedMdObjectMatcher(IComparisonSession session, MergeRule mergeRule, Predefined main, Predefined other, Predefined ancestor) Creates matcher instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected com._1c.g5.v8.dt.md.compare.matching.PredefinedMdObjectMatcher.PredefinedItemIdcreateItemId(org.eclipse.emf.ecore.EObject item) Creates unique identifier of the given item.protected ComparedObjectPathgetRootPath(org.eclipse.emf.ecore.EObject rootItem) Returns the path for the root item.protected voidmatchElements(org.eclipse.emf.ecore.EObject item, ComparedObjectPath itemPath, ComparisonSide side) Matches child items of the given container and puts them by calling#putElement(EObject, ComparisonSide)method.Methods inherited from class com._1c.g5.v8.dt.compare.matching.AbstractElementsTreeMatcher
buildPath, buildPath, createItemId, getMatchedChildren, getMatchedElement, putMatchedElement
-
Constructor Details
-
PredefinedMdObjectMatcher
public PredefinedMdObjectMatcher(IComparisonSession session, MergeRule mergeRule, Predefined main, Predefined other, Predefined ancestor) Creates matcher instance. At least one of input elements must not benull.- Parameters:
session- the comparison session, cannot benullmergeRule- the merge rule to apply when merging elements tree, cannot benullmain- main element to compareother- other element to compareancestor- common ancestor element to compare
-
-
Method Details
-
getRootPath
Description copied from class:AbstractElementsTreeMatcherReturns the path for the root item.- Specified by:
getRootPathin classAbstractElementsTreeMatcher- Returns:
- the path built
-
createItemId
protected com._1c.g5.v8.dt.md.compare.matching.PredefinedMdObjectMatcher.PredefinedItemId createItemId(org.eclipse.emf.ecore.EObject item) Description copied from class:AbstractElementsTreeMatcherCreates unique identifier of the given item.- Specified by:
createItemIdin classAbstractElementsTreeMatcher- Parameters:
item- the item for which to create identifier, nevernull- Returns:
- the identifier created, never
null
-
matchElements
protected void matchElements(org.eclipse.emf.ecore.EObject item, ComparedObjectPath itemPath, ComparisonSide side) Description copied from class:AbstractElementsTreeMatcherMatches child items of the given container and puts them by calling#putElement(EObject, ComparisonSide)method.- Specified by:
matchElementsin classAbstractElementsTreeMatcher- Parameters:
item- the container to matchitemPath- the path for the container, nevernullside- the comparison side, nevernull
-