Class ListElementTerminalNode
- 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.ListElementTerminalNode
-
- All Implemented Interfaces:
IComparedElement
,IMergeRulePartialModelNode
,IPartialListElementNode
,IPartialModelNode
- Direct Known Subclasses:
EqualListElementTerminalNode
public class ListElementTerminalNode extends AbstractNodeWithLabels implements IPartialListElementNode
A terminal list element partial model node.
-
-
Constructor Summary
Constructors Modifier Constructor Description ListElementTerminalNode(IPartialModelNode parent, ComparisonNode node, String mainLabel, String otherLabel, IImageProvider imageProvider, String label, IComparisonSession comparisonSession)
Constructs partial node for the specified comparison node.protected
ListElementTerminalNode(IPartialModelNode parent, String representation, org.eclipse.emf.ecore.EStructuralFeature parentFeature, int mainPosition, int otherPosition, ComparisonSide objectSide, IImageProvider imageProvider, String label, IComparisonSession comparisonSession)
Constructs partial node when the comparison node is absent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLabel()
Returns the node label.org.eclipse.emf.ecore.EStructuralFeature
getParentFeature()
Returns feature of a parent collection where this element lies.int
getPosition(ComparisonSide side)
Returns element's position (index) in the collection of model objects from the corresponding side.-
Methods inherited from class com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractNodeWithLabels
addChild, getAvailableMergeRules, getImage, getMergeRule, getSideLabel, getStatus, getTooltipText, hasChanged, hasDifferences, hasDoubleChanges, hasOnlyOnOneSide, hasOrderChanged, hasPotentialMergeProblems, hasUnchanged, isCheckable, isChecked, isGrayed, setChecked, setGrayed, setMergeRule, setShowMergeRule, setStatus, showMergeRule
-
Methods inherited from class com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractPartialModelNode
canExpand, check, getChildren, getClosestDirectParent, getComparisonSession, getCustomMergeSettingsStatus, getNodeId, getParent, getSide, getSortedChildren, hasChildren, 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, check, getChildren, getComparisonSession, getCustomMergeSettingsStatus, getImage, getNodeId, getParent, getSide, getSideLabel, getSortedChildren, getStatus, getTooltipText, hasChildren, isCheckable, isChecked, isGrayed, prioritize, retrieveComparisonNode, setChecked, setCustomMergeSettingsStatus, setParent, setStatus
-
-
-
-
Constructor Detail
-
ListElementTerminalNode
public ListElementTerminalNode(IPartialModelNode parent, ComparisonNode node, String mainLabel, String otherLabel, IImageProvider imageProvider, String label, IComparisonSession comparisonSession)
Constructs partial node for the specified comparison node.- Parameters:
parent
- the parent partial model nodenode
- the comparison node, cannot benull
mainLabel
- representation of the MAIN sideotherLabel
- representation of the OTHER sideimageProvider
- the image providerlabel
- the list element labelcomparisonSession
- the comparison session
-
ListElementTerminalNode
protected ListElementTerminalNode(IPartialModelNode parent, String representation, org.eclipse.emf.ecore.EStructuralFeature parentFeature, int mainPosition, int otherPosition, ComparisonSide objectSide, IImageProvider imageProvider, String label, IComparisonSession comparisonSession)
Constructs partial node when the comparison node is absent. Called to create equal partial nodes, seeIPartialEqualNode
.- Parameters:
parent
- the parent partial model noderepresentation
- the object's representationparentFeature
- the object's parent feature, notnull
mainPosition
- the object's position from the MAIN sideotherPosition
- the object's position from the OTHER sideobjectSide
- the object's sideimageProvider
- the image providerlabel
- the list element labelcomparisonSession
- the comparison session
-
-
Method Detail
-
getLabel
public String getLabel()
Description copied from interface:IPartialModelNode
Returns the node label.- Specified by:
getLabel
in interfaceIPartialModelNode
- Overrides:
getLabel
in classAbstractNodeWithLabels
- Returns:
- the node label
-
getParentFeature
public org.eclipse.emf.ecore.EStructuralFeature getParentFeature()
Description copied from interface:IPartialListElementNode
Returns feature of a parent collection where this element lies.- Specified by:
getParentFeature
in interfaceIPartialListElementNode
- Returns:
- the corresponding feature, never
null
-
getPosition
public int getPosition(ComparisonSide side)
Description copied from interface:IPartialListElementNode
Returns element's position (index) in the collection of model objects from the corresponding side.- Specified by:
getPosition
in interfaceIPartialListElementNode
- Parameters:
side
- the comparison side, cannot benull
- Returns:
- the element's position or -1 if the element is absent under the given comparison side
-
-