Class AbstractEqualNodeWithChildren
- java.lang.Object
-
- com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractPartialModelNode
-
- com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractNodeWithLabels
-
- com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractNodeWithLabelsAndChildren
-
- com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractEqualNodeWithChildren
-
- All Implemented Interfaces:
IComparedElement
,IMergeRulePartialModelNode
,IPartialEqualNode
,IPartialModelNode
- Direct Known Subclasses:
EqualEmfFeatureNodeWithChildren
,EqualListElementNodeWithChildren
public abstract class AbstractEqualNodeWithChildren extends AbstractNodeWithLabelsAndChildren implements IPartialEqualNode
Equal partial node with children where objects are not assumed to be changed during the merge process.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractEqualNodeWithChildren(IPartialModelNode parent, org.eclipse.emf.ecore.EObject modelObject, org.eclipse.emf.ecore.EStructuralFeature feature, int modelObjectPosition, ComparisonSide objectSide, String label, IImageProvider imageProvider, IComparisonSession comparisonSession)
Constructs a node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
check(boolean checked)
Checks the node.ComparisonSide
getModelObjectSide()
Returns the side (MAIN or OTHER) where the model object presents and the partial node is built for.ComparisonSide
getSide()
If the compared object presents only on MAIN or on OTHER side and is absent on the other one, that side is returned.org.eclipse.emf.ecore.EObject
retrieveModelObject(ComparisonContext comparisonContext)
Retrieves model object the node is built for.-
Methods inherited from class com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractNodeWithLabelsAndChildren
addChild, canExpand, getChildren, getSortedChildren, hasChildren, isGrayed, removeChild, setGrayed
-
Methods inherited from class com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractNodeWithLabels
getAvailableMergeRules, getImage, getLabel, getMergeRule, getSideLabel, getStatus, getTooltipText, hasChanged, hasDifferences, hasDoubleChanges, hasOnlyOnOneSide, hasOrderChanged, hasPotentialMergeProblems, hasUnchanged, isCheckable, isChecked, setChecked, setMergeRule, setShowMergeRule, setStatus, showMergeRule
-
Methods inherited from class com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractPartialModelNode
getClosestDirectParent, getComparisonSession, getCustomMergeSettingsStatus, getNodeId, getParent, prioritize, retrieveComparisonNode, setCustomMergeSettingsStatus, setParent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.v8.dt.compare.model.IComparedElement
hasChanged, hasDifferences, hasDoubleChanges, hasOnlyOnOneSide, hasOrderChanged, hasPotentialMergeProblems, hasUnchanged
-
Methods inherited from interface com._1c.g5.v8.dt.compare.ui.partialmodel.node.IMergeRulePartialModelNode
getAvailableMergeRules, getMergeRule, setMergeRule, setShowMergeRule, showMergeRule
-
Methods inherited from interface com._1c.g5.v8.dt.compare.ui.partialmodel.node.IPartialModelNode
addChild, canExpand, getChildren, getComparisonSession, getCustomMergeSettingsStatus, getImage, getLabel, getNodeId, getParent, getSideLabel, getSortedChildren, getStatus, getTooltipText, hasChildren, isCheckable, isChecked, isGrayed, prioritize, retrieveComparisonNode, setChecked, setCustomMergeSettingsStatus, setParent, setStatus
-
-
-
-
Constructor Detail
-
AbstractEqualNodeWithChildren
protected AbstractEqualNodeWithChildren(IPartialModelNode parent, org.eclipse.emf.ecore.EObject modelObject, org.eclipse.emf.ecore.EStructuralFeature feature, int modelObjectPosition, ComparisonSide objectSide, String label, IImageProvider imageProvider, IComparisonSession comparisonSession)
Constructs a node.- Parameters:
parent
- the parent partial model node, cannot benull
modelObject
- the object to build partial node for, cannot benull
feature
- the object's feature, cannot benull
modelObjectPosition
- the object's position in a many-feature array or -1objectSide
- the side where the object presents ornull
if it presents on both sideslabel
- the object's representationimageProvider
- the image providercomparisonSession
- the comparison session, cannot benull
-
-
Method Detail
-
getSide
public ComparisonSide getSide()
Description copied from interface:IPartialModelNode
If the compared object presents only on MAIN or on OTHER side and is absent on the other one, that side is returned.- Specified by:
getSide
in interfaceIPartialModelNode
- Overrides:
getSide
in classAbstractPartialModelNode
- Returns:
- the MAIN or OTHER side or
null
if the compared object presents on both sides
-
getModelObjectSide
public ComparisonSide getModelObjectSide()
Description copied from interface:IPartialEqualNode
Returns the side (MAIN or OTHER) where the model object presents and the partial node is built for.- Specified by:
getModelObjectSide
in interfaceIPartialEqualNode
- Returns:
- the MAIN or OTHER side, never COMMON_ANCESTOR, never
null
-
check
public void check(boolean checked)
Description copied from interface:IPartialModelNode
Checks the node. It changes node's state in the model and sets corresponding flag in the partial model node.- Specified by:
check
in interfaceIPartialModelNode
- Overrides:
check
in classAbstractPartialModelNode
- Parameters:
checked
-true
to check,false
to uncheck
-
retrieveModelObject
public org.eclipse.emf.ecore.EObject retrieveModelObject(ComparisonContext comparisonContext)
Description copied from interface:IPartialEqualNode
Retrieves model object the node is built for.- Specified by:
retrieveModelObject
in interfaceIPartialEqualNode
- Parameters:
comparisonContext
- the comparison context, nevernull
- Returns:
- the model object, never
null
-
-