Class AbstractDirectPartialModelNode
- java.lang.Object
-
- com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractPartialModelNode
-
- com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractPartialModelNodeWithChildren
-
- com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractDirectPartialModelNode
-
- All Implemented Interfaces:
IComparedElement
,IDirectPartialModelNode
,IPartialModelNode
- Direct Known Subclasses:
ExternalPropertyPartialModelNode
,ProjectPartialModelNode
public abstract class AbstractDirectPartialModelNode extends AbstractPartialModelNodeWithChildren implements IDirectPartialModelNode
A partial model node directly corresponding to a comparison model node.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDirectPartialModelNode(ComparisonNode comparisonNode, IComparisonSession comparisonSession)
Constructs a direct node.protected
AbstractDirectPartialModelNode(IPartialModelNode parent, ComparisonNode comparisonNode, boolean checked, IComparisonSession comparisonSession)
Constructs a direct node.protected
AbstractDirectPartialModelNode(IPartialModelNode parent, ComparisonNode comparisonNode, IComparisonSession comparisonSession)
Constructs a direct node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<org.eclipse.emf.ecore.EReference>
getChildFeaturesOrderDefiningList()
Returns an order-defining list of features this node may contain as sub-nodes.String
getLabel()
Returns the node label.String
getSideLabel(ComparisonSide side)
Returns a label (textual representation) of the value referred from the specified side of the node.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.void
prioritize()
Prioritize the node comparison in the specified session.void
setChecked(boolean value)
Sets the "Checked" state of the partial model node.void
setExpandable(boolean value)
Sets the node as expandable (i.e.void
setImageProvider(IImageProvider imageProvider)
Sets the image provider.-
Methods inherited from class com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractPartialModelNodeWithChildren
addChild, getChildren, getSortedChildren, getStatus, hasChildren, isGrayed, removeChild, setGrayed, setStatus, to, to
-
Methods inherited from class com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractPartialModelNode
canExpand, check, getClosestDirectParent, getComparisonSession, getCustomMergeSettingsStatus, getImage, getNodeId, getParent, getSide, 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.ui.partialmodel.node.IDirectPartialModelNode
canHaveChildren, setGrayed
-
Methods inherited from interface com._1c.g5.v8.dt.compare.ui.partialmodel.node.IPartialModelNode
addChild, canExpand, check, getChildren, getComparisonSession, getCustomMergeSettingsStatus, getImage, getNodeId, getParent, getSide, getSortedChildren, getStatus, hasChildren, isGrayed, retrieveComparisonNode, setCustomMergeSettingsStatus, setParent, setStatus
-
-
-
-
Constructor Detail
-
AbstractDirectPartialModelNode
protected AbstractDirectPartialModelNode(IPartialModelNode parent, ComparisonNode comparisonNode, boolean checked, IComparisonSession comparisonSession)
Constructs a direct node.- Parameters:
parent
- the parent nodecomparisonNode
- the comparison node this mode will be based onchecked
-true
if the constructed node is checkedcomparisonSession
- the comparison session
-
AbstractDirectPartialModelNode
protected AbstractDirectPartialModelNode(IPartialModelNode parent, ComparisonNode comparisonNode, IComparisonSession comparisonSession)
Constructs a direct node.- Parameters:
parent
- the parent nodecomparisonNode
- the comparison node this mode will be based oncomparisonSession
- the comparison session
-
AbstractDirectPartialModelNode
protected AbstractDirectPartialModelNode(ComparisonNode comparisonNode, IComparisonSession comparisonSession)
Constructs a direct node.- Parameters:
comparisonNode
- the comparison node this mode will be based oncomparisonSession
- the comparison session
-
-
Method Detail
-
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.- Specified by:
hasDoubleChanges
in interfaceIComparedElement
- 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.- Specified by:
hasPotentialMergeProblems
in interfaceIComparedElement
- Returns:
true
if have potential merge problems,false
otherwise
-
getTooltipText
public String getTooltipText()
Description copied from interface:IPartialModelNode
Returns node's tooltip text.- Specified by:
getTooltipText
in interfaceIPartialModelNode
- Returns:
- the text to be displayed as tooltip or
null
if no tooltip to be displayed
-
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.- Specified by:
hasDifferences
in interfaceIComparedElement
- 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.- Specified by:
hasChanged
in interfaceIComparedElement
- 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.- Specified by:
hasOrderChanged
in interfaceIComparedElement
- 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
-
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.- Specified by:
hasUnchanged
in interfaceIComparedElement
- 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.
-
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.- Specified by:
hasOnlyOnOneSide
in interfaceIComparedElement
- 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
-
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.- Specified by:
getSideLabel
in interfaceIPartialModelNode
- Parameters:
side
- the side of the node- Returns:
- a label
-
getLabel
public String getLabel()
Description copied from interface:IPartialModelNode
Returns the node label.- Specified by:
getLabel
in interfaceIPartialModelNode
- Overrides:
getLabel
in classAbstractPartialModelNodeWithChildren
- Returns:
- the node label
-
setChecked
public void setChecked(boolean value)
Description copied from interface:IPartialModelNode
Sets the "Checked" state of the partial model node.- Specified by:
setChecked
in interfaceIPartialModelNode
- Parameters:
value
- the value to set
-
prioritize
public void prioritize()
Description copied from interface:IPartialModelNode
Prioritize the node comparison in the specified session.- Specified by:
prioritize
in interfaceIPartialModelNode
- Overrides:
prioritize
in classAbstractPartialModelNode
-
setExpandable
public void setExpandable(boolean value)
Description copied from interface:IDirectPartialModelNode
Sets the node as expandable (i.e. that it can have children).- Specified by:
setExpandable
in interfaceIDirectPartialModelNode
- Parameters:
value
- the value to set
-
isChecked
public boolean isChecked()
Description copied from interface:IPartialModelNode
Checks whether this node is checked.- Specified by:
isChecked
in interfaceIPartialModelNode
- Returns:
true
if the node is checked, andfalse
otherwise
-
isCheckable
public boolean isCheckable()
Description copied from interface:IPartialModelNode
Checks if the node is checkable.- Specified by:
isCheckable
in interfaceIPartialModelNode
- Returns:
true
if the node is checkable, andfalse
otherwise
-
setImageProvider
public void setImageProvider(IImageProvider imageProvider)
Description copied from interface:IDirectPartialModelNode
Sets the image provider.- Specified by:
setImageProvider
in interfaceIDirectPartialModelNode
- Parameters:
imageProvider
- the image provider, may benull
-
getChildFeaturesOrderDefiningList
protected List<org.eclipse.emf.ecore.EReference> getChildFeaturesOrderDefiningList()
Description copied from class:AbstractPartialModelNodeWithChildren
Returns an order-defining list of features this node may contain as sub-nodes.- Specified by:
getChildFeaturesOrderDefiningList
in classAbstractPartialModelNodeWithChildren
- Returns:
- the list of features in the correct order, may be empty, never
null
-
-