Class AbstractMdAwareComparisonParticipant
java.lang.Object
com._1c.g5.v8.dt.compare.participant.AbstractEmfBasedComparisonParticipant
com._1c.g5.v8.dt.md.compare.participant.AbstractMdAwareComparisonParticipant
- All Implemented Interfaces:
IComparisonParticipant
- Direct Known Subclasses:
AdditionalIndexesComparisonParticipant,ChartComparisonParticipant,DcsComparisonParticipant,FormComparisonParticipant,MdObjectComparisonParticipant
public abstract class AbstractMdAwareComparisonParticipant
extends AbstractEmfBasedComparisonParticipant
Abstract MD aware comparison participant.
-
Nested Class Summary
Nested classes/interfaces inherited from class com._1c.g5.v8.dt.compare.participant.AbstractEmfBasedComparisonParticipant
AbstractEmfBasedComparisonParticipant.BmIdsWrapper, AbstractEmfBasedComparisonParticipant.EObjectClassFeatures -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IBmModelManagerprotected static final Patternprotected static final booleanprotected org.eclipse.xtext.naming.IQualifiedNameProviderprotected static final CharacterFields inherited from class com._1c.g5.v8.dt.compare.participant.AbstractEmfBasedComparisonParticipant
LOG_TYPES, pictureManager, projectFileSystemSupportProvider, qualifiedNameFilePathConverter, scopeProvider, topObjectFqnGenerator -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates new participant instance with default comparison nodes factory.protectedCreates new participant instance with specific comparison nodes factory. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanareDifferentEClassObjectsMergeable(org.eclipse.emf.ecore.EObject main, org.eclipse.emf.ecore.EObject other, ComparisonContext comparisonContext) protected ComparisonFlagscompareEmfObject(TopComparisonNode topParent, LazyNodeProvider<? extends ComparisonNode> nodeProvider, AbstractComparedEmfObjects<?> comparingObject, AbstractEmfBasedComparisonParticipant.BmIdsWrapper childBmIds, ComparisonContext comparisonContext) protected StringextractTopLink(String symlink) protected IEmfObjectMatchergetCustomMatcher(TopComparisonNode topNode, org.eclipse.emf.ecore.EReference reference, ComparisonContext objectContext) Returns a custom matcher for the specified reference.getDefaultMergeRule(ComparisonNode node, IComparisonSession session) Returns the default merge rule for the given node.protected StringgetExternalPropertyQualifyingType(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference externalProperty) Returns the EClass of the specified external property of the specified EObject.protected StringgetExternalPropertySymlink(TopComparisonNode node, org.eclipse.emf.ecore.EReference externalProperty, ComparisonSide side, org.eclipse.emf.ecore.EObject eObject) Returns the symbolic link (FQN) of the specified external property.protected booleanhasConflictChangesInCollection(ComparedFeatures<org.eclipse.emf.ecore.EReference> comparedReferences, Collection<? extends MatchedEmfObjects> matchedElements) Tells whether the collection being compared should be treated as containing conflicts.protected booleanisBmIdMayChangeOnMerge(IBmObject bmObject) Tells whether bmId of an object may change during the merge phase.protected booleanisFeatureTakenFromPreferredSide(org.eclipse.emf.ecore.EObject item, org.eclipse.emf.ecore.EStructuralFeature feature, MatchedEmfObjects matchedElement, MergeRule rule) Checks whether specified feature of a merged item got from the preferred side or not.booleansupportsPrioritizedMerging(ComparisonNode node, IComparisonSession session) Tells whether the given node supports prioritized merging.Methods inherited from class com._1c.g5.v8.dt.compare.participant.AbstractEmfBasedComparisonParticipant
adaptOtherReference, adoptEClassToImport, adoptMainSideFeature, assertEClassesMatch, calculateCompareValueFlags, checkForOneSideConflict, clear, compareEmfContainment, compareOneSideObject, comparePictureResource, compareReference, compareValue, createClassFeaturesInstance, createImportedEObject, createResourceForImportedObject, deletePictureResourceFile, findChildNodeByFeature, findChildNodeByMatchedId, getClassFeatures, getClassFeatures, getFeaturesToCompareForOneSideObject, getFeatureTypeDescription, getForcedDDRebuildScope, getMultiReferenceSymlinks, getMultiReferenceValueSymlink, getNodeFactory, getOtherSideFeature, getPictureResourcePath, getPotentialMergeProblemsDescriptions, getQualifiedName, getSingleReferenceSymlink, getTopNode, importEmfObject, importPictureResourceFile, isCandidateForPotentialMergeProblems, isExcludedFromComparison, isFeatureWithCustomMerge, isUnmatchableContainment, matchEmfObjects, mergeEmfProperties, mergeEmfReference, mergeOtherContainment, mergeUsingExternalTool, needCreateOneSideNode, onChildrenMerged, prepareRenameOperations, removeObjectFromContainerOnMerge, removeObjectFromListOnMerge, restoreCustomSettings, saveCustomSettings, setObjectToContainerOnMerge, skipFeatureOnImportEmfObject, supportsCustomMerging, supportsMergingUsingExternalTool, translateReferencesInImportedObject, updatePictureResourceFile, wrapOtherReferenceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com._1c.g5.v8.dt.compare.core.IComparisonParticipant
ableToBreakCorrespondence, addNewTopObjectToComparison, adoptExternalProperty, breakCorrespondence, breakMainSideCorrespondence, combineOneSideNodes, compare, createMergeContext, getDefaultMustBeMerged, getModelPackage, getPotentialCorrespondingNodes, merge, retrieveComparedObjects, supports, updateComparison, validateMerge
-
Field Details
-
LOGGING
protected static final boolean LOGGING -
SYMLINK_SEPARATOR
-
INVALID_SYMLINK_PATTERN
-
qualifiedNameProvider
@Inject protected org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider -
bmModelManager
-
-
Constructor Details
-
AbstractMdAwareComparisonParticipant
protected AbstractMdAwareComparisonParticipant()Creates new participant instance with default comparison nodes factory. -
AbstractMdAwareComparisonParticipant
Creates new participant instance with specific comparison nodes factory.- Parameters:
nodeFactory- the node factory to use, cannot benull
-
-
Method Details
-
supportsPrioritizedMerging
Description copied from interface:IComparisonParticipantTells whether the given node supports prioritized merging.- Specified by:
supportsPrioritizedMergingin interfaceIComparisonParticipant- Overrides:
supportsPrioritizedMergingin classAbstractEmfBasedComparisonParticipant- Parameters:
node- the node to check, cannot benullsession- the comparison session, cannot benull- Returns:
trueif the node supports prioritized merging,falseotherwise
-
getDefaultMergeRule
Description copied from interface:IComparisonParticipantReturns the default merge rule for the given node.- Parameters:
node- the node to get default merge rule for, can not benullsession- the comparison session, can not benull- Returns:
- the default merge rule or
nullif it wasn't specified
-
getCustomMatcher
protected IEmfObjectMatcher getCustomMatcher(TopComparisonNode topNode, org.eclipse.emf.ecore.EReference reference, ComparisonContext objectContext) Description copied from class:AbstractEmfBasedComparisonParticipantReturns a custom matcher for the specified reference.- Overrides:
getCustomMatcherin classAbstractEmfBasedComparisonParticipant- Parameters:
topNode- the top nodereference- the reference to get a custom matcher forobjectContext- the current comparison context, cannot benull- Returns:
- a custom matcher or
nullif no custom matcher can be found
-
extractTopLink
-
getExternalPropertySymlink
protected String getExternalPropertySymlink(TopComparisonNode node, org.eclipse.emf.ecore.EReference externalProperty, ComparisonSide side, org.eclipse.emf.ecore.EObject eObject) Description copied from class:AbstractEmfBasedComparisonParticipantReturns the symbolic link (FQN) of the specified external property.- Specified by:
getExternalPropertySymlinkin classAbstractEmfBasedComparisonParticipant- Parameters:
node- the node with the external propertyexternalProperty- theEReferenceto the external propertyside- the comparison sideeObject- theEObjectreferencing the external property- Returns:
- the symbolic link
-
compareEmfObject
protected ComparisonFlags compareEmfObject(TopComparisonNode topParent, LazyNodeProvider<? extends ComparisonNode> nodeProvider, AbstractComparedEmfObjects<?> comparingObject, AbstractEmfBasedComparisonParticipant.BmIdsWrapper childBmIds, ComparisonContext comparisonContext) - Overrides:
compareEmfObjectin classAbstractEmfBasedComparisonParticipant
-
getExternalPropertyQualifyingType
protected String getExternalPropertyQualifyingType(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference externalProperty) Description copied from class:AbstractEmfBasedComparisonParticipantReturns the EClass of the specified external property of the specified EObject.- Specified by:
getExternalPropertyQualifyingTypein classAbstractEmfBasedComparisonParticipant- Returns:
-
isFeatureTakenFromPreferredSide
protected boolean isFeatureTakenFromPreferredSide(org.eclipse.emf.ecore.EObject item, org.eclipse.emf.ecore.EStructuralFeature feature, MatchedEmfObjects matchedElement, MergeRule rule) Checks whether specified feature of a merged item got from the preferred side or not.- Parameters:
item- the item which feature to check, cannot benullfeature- the feature to check, cannot benullmatchedElement- the item-related element matched on comparison stage, cannot benullrule- the merge rule, cannot benull- Returns:
trueif item's property got from preferred side,falseotherwise
-
areDifferentEClassObjectsMergeable
protected boolean areDifferentEClassObjectsMergeable(org.eclipse.emf.ecore.EObject main, org.eclipse.emf.ecore.EObject other, ComparisonContext comparisonContext) - Overrides:
areDifferentEClassObjectsMergeablein classAbstractEmfBasedComparisonParticipant
-
hasConflictChangesInCollection
protected boolean hasConflictChangesInCollection(ComparedFeatures<org.eclipse.emf.ecore.EReference> comparedReferences, Collection<? extends MatchedEmfObjects> matchedElements) Description copied from class:AbstractEmfBasedComparisonParticipantTells whether the collection being compared should be treated as containing conflicts.- Overrides:
hasConflictChangesInCollectionin classAbstractEmfBasedComparisonParticipant- Parameters:
comparedReferences- the triple of many-features being compared, cannot benull- Returns:
trueif the collection should be treated as containing conflicts,falseotherwise
-
isBmIdMayChangeOnMerge
Description copied from class:AbstractEmfBasedComparisonParticipantTells whether bmId of an object may change during the merge phase. Override in descendants for specific types.- Overrides:
isBmIdMayChangeOnMergein classAbstractEmfBasedComparisonParticipant- Parameters:
bmObject- the object to be checked, cannot benull- Returns:
trueif bmId may change,falseotherwise
-