Class RootPartialModelNode
- java.lang.Object
-
- com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractPartialModelNode
-
- com._1c.g5.v8.dt.compare.ui.partialmodel.node.RootPartialModelNode
-
- All Implemented Interfaces:
IComparedElement
,IPartialModelNode
public class RootPartialModelNode extends AbstractPartialModelNode
The root node of the comparison tree.
-
-
Constructor Summary
Constructors Constructor Description RootPartialModelNode(List<com._1c.g5.v8.dt.internal.compare.ui.editor.DtComparisonEditor.ComparisonArtifacts> comparisonArtifactsList)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChild(IPartialModelNode node)
Adds the specified child node.Collection<IPartialModelNode>
getChildren()
Returns the child nodes.String
getSideLabel(ComparisonSide side)
Returns a label (textual representation) of the value referred from the specified side of the node.ComparisonNodeStatus
getStatus()
Returns the status of the node in the comparison process.String
getTooltipText()
Returns node's tooltip text.boolean
hasChanged(ComparisonSide side1, ComparisonSide side2)
Returnstrue
if compared objects on the specified sides have changed properties or elements.boolean
hasDifferences(ComparisonSide side1, ComparisonSide side2)
Returnstrue
if compared objects on the specified sides are different, i.e.boolean
hasDoubleChanges()
Returnstrue
if the compared objects have at least one property that was changed from the corresponding property of the common ancestor object both in the main and in the other objects.boolean
hasOnlyOnOneSide(ComparisonSide side1, ComparisonSide side2)
Returnstrue
if the compared object is present on the specified first side, and absent on the specified other side.boolean
hasOrderChanged(ComparisonSide side1, ComparisonSide side2)
Returnstrue
if the compared object's order in its parent collection was changed between the specified sides.boolean
hasPotentialMergeProblems()
Tells whether the compared element has potential problems that could break a project after the merge.boolean
hasUnchanged(ComparisonSide side1, ComparisonSide side2)
Returnstrue
if compared objects on the specified sides have unchanged properties or elements.boolean
isCheckable()
Checks if the node is checkable.boolean
isChecked()
Checks whether this node is checked.boolean
isGrayed()
Checks whether the checkbox of this node is grayed if applicable (i.e.void
setChecked(boolean value)
Sets the "Checked" state of the partial model node.void
setStatus(ComparisonNodeStatus value)
Sets the status of the node.-
Methods inherited from class com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractPartialModelNode
canExpand, check, getClosestDirectParent, getComparisonSession, getCustomMergeSettingsStatus, getImage, getLabel, getNodeId, getParent, getSide, getSortedChildren, hasChildren, prioritize, retrieveComparisonNode, setCustomMergeSettingsStatus, setParent
-
-
-
-
Constructor Detail
-
RootPartialModelNode
public RootPartialModelNode(List<com._1c.g5.v8.dt.internal.compare.ui.editor.DtComparisonEditor.ComparisonArtifacts> comparisonArtifactsList)
Constructor.- Parameters:
comparisonArtifactsList
- the comparison artifacts, can not benull
-
-
Method Detail
-
addChild
public void addChild(IPartialModelNode node)
Description copied from interface:IPartialModelNode
Adds the specified child node.- Parameters:
node
- the node to add as a child
-
getChildren
public Collection<IPartialModelNode> getChildren()
Description copied from interface:IPartialModelNode
Returns the child nodes. The order of child nodes is not defined.- Specified by:
getChildren
in interfaceIPartialModelNode
- Overrides:
getChildren
in classAbstractPartialModelNode
- Returns:
- the child nodes
-
getStatus
public ComparisonNodeStatus getStatus()
Description copied from interface:IPartialModelNode
Returns the status of the node in the comparison process.- Returns:
- node's current status during comparison
-
getSideLabel
public String getSideLabel(ComparisonSide side)
Description copied from interface:IPartialModelNode
Returns a label (textual representation) of the value referred from the specified side of the node.- Parameters:
side
- the side of the node- Returns:
- a label
-
isCheckable
public boolean isCheckable()
Description copied from interface:IPartialModelNode
Checks if the node is checkable.- Returns:
true
if the node is checkable, andfalse
otherwise
-
isChecked
public boolean isChecked()
Description copied from interface:IPartialModelNode
Checks whether this node is checked.- Returns:
true
if the node is checked, andfalse
otherwise
-
setChecked
public void setChecked(boolean value)
Description copied from interface:IPartialModelNode
Sets the "Checked" state of the partial model node.- Parameters:
value
- the value to set
-
isGrayed
public boolean isGrayed()
Description copied from interface:IPartialModelNode
Checks whether the checkbox of this node is grayed if applicable (i.e. it has some children checked and others unchecked). This means that the node has checkable/mergeable children that will not be merged.- Returns:
true
if the node's checkbox is grayed
-
setStatus
public void setStatus(ComparisonNodeStatus value)
Description copied from interface:IPartialModelNode
Sets the status of the node.
-
hasDifferences
public boolean hasDifferences(ComparisonSide side1, ComparisonSide side2)
Description copied from interface:IComparedElement
Returnstrue
if compared objects on the specified sides are different, i.e. they have changes or one of them is absent.- Parameters:
side1
- the first side of the comparison direction, notnull
side2
- the second side of the comparison direction, notnull
- Returns:
true
if the compared objects are different
-
hasChanged
public boolean hasChanged(ComparisonSide side1, ComparisonSide side2)
Description copied from interface:IComparedElement
Returnstrue
if compared objects on the specified sides have changed properties or elements. This implies that the compared objects must be present on both specified sides.- Parameters:
side1
- the first side of the comparison direction, notnull
side2
- the second side of the comparison direction, notnull
- Returns:
true
if the compared objects have changed properties
-
hasUnchanged
public boolean hasUnchanged(ComparisonSide side1, ComparisonSide side2)
Description copied from interface:IComparedElement
Returnstrue
if compared objects on the specified sides have unchanged properties or elements. This implies that the compared objects must be present on both specified sides.- Parameters:
side1
- the first side of the comparison direction, notnull
side2
- the second side of the comparison direction, notnull
- Returns:
true
if the compared objects have changed properties.
-
hasOrderChanged
public boolean hasOrderChanged(ComparisonSide side1, ComparisonSide side2)
Description copied from interface:IComparedElement
Returnstrue
if the compared object's order in its parent collection was changed between the specified sides. This implies that the compared objects must be present on both specified sides.- Parameters:
side1
- the first side of the comparison direction, notnull
side2
- the second side of the comparison direction, notnull
- Returns:
true
if the compared object's order was changed
-
hasOnlyOnOneSide
public boolean hasOnlyOnOneSide(ComparisonSide side1, ComparisonSide side2)
Description copied from interface:IComparedElement
Returnstrue
if the compared object is present on the specified first side, and absent on the specified other side.- Parameters:
side1
- the first side of the comparison direction, notnull
side2
- the second side of the comparison direction, notnull
- Returns:
true
if the compared object is present onside1
and absent onside2
-
hasDoubleChanges
public boolean hasDoubleChanges()
Description copied from interface:IComparedElement
Returnstrue
if the compared objects have at least one property that was changed from the corresponding property of the common ancestor object both in the main and in the other objects. This flag is only relevant for three-way nodes.- Returns:
true
if the node has properties with double changes or a child node with this flag
-
hasPotentialMergeProblems
public boolean hasPotentialMergeProblems()
Description copied from interface:IComparedElement
Tells whether the compared element has potential problems that could break a project after the merge.- Returns:
true
if have potential merge problems,false
otherwise
-
getTooltipText
public String getTooltipText()
Description copied from interface:IPartialModelNode
Returns node's tooltip text.- Returns:
- the text to be displayed as tooltip or
null
if no tooltip to be displayed
-
-