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
public class PredefinedMdObjectMatcher extends AbstractElementsTreeMatcher
Matcher of predefined elements of md-objects.
-
-
Constructor Summary
Constructors Constructor Description PredefinedMdObjectMatcher(IComparisonSession session, MergeRule mergeRule, Predefined main, Predefined other, Predefined ancestor)
Creates matcher instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com._1c.g5.v8.dt.md.compare.matching.PredefinedMdObjectMatcher.PredefinedItemId
createItemId(org.eclipse.emf.ecore.EObject item)
Creates unique identifier of the given item.protected ComparedObjectPath
getRootPath(org.eclipse.emf.ecore.EObject rootItem)
Returns the path for the root item.protected void
matchElements(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 Detail
-
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 benull
mergeRule
- the merge rule to apply when merging elements tree, cannot benull
main
- main element to compareother
- other element to compareancestor
- common ancestor element to compare
-
-
Method Detail
-
getRootPath
protected ComparedObjectPath getRootPath(org.eclipse.emf.ecore.EObject rootItem)
Description copied from class:AbstractElementsTreeMatcher
Returns the path for the root item.- Specified by:
getRootPath
in 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:AbstractElementsTreeMatcher
Creates unique identifier of the given item.- Specified by:
createItemId
in 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:AbstractElementsTreeMatcher
Matches child items of the given container and puts them by calling#putElement(EObject, ComparisonSide)
method.- Specified by:
matchElements
in classAbstractElementsTreeMatcher
- Parameters:
item
- the container to matchitemPath
- the path for the container, nevernull
side
- the comparison side, nevernull
-
-