Class ProjectPartialModelNode
- 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
-
- com._1c.g5.v8.dt.compare.ui.partialmodel.node.ProjectPartialModelNode
-
- All Implemented Interfaces:
IComparedElement
,IDirectPartialModelNode
,IPartialModelNode
public class ProjectPartialModelNode extends AbstractDirectPartialModelNode
The root project node of the partial model.
-
-
Constructor Summary
Constructors Constructor Description ProjectPartialModelNode(IComparisonSession comparisonSession)
Constructs a root project node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canHaveChildren()
Checks if this node can have children.void
check(boolean checked)
Checks the node.org.eclipse.swt.graphics.Image
getImage()
Returns the node image.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
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.-
Methods inherited from class com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractDirectPartialModelNode
getChildFeaturesOrderDefiningList, hasOrderChanged, prioritize, setChecked, setExpandable, setImageProvider
-
Methods inherited from class com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractPartialModelNodeWithChildren
addChild, getChildren, getSortedChildren, getStatus, hasChildren, removeChild, setGrayed, setStatus, to, to
-
Methods inherited from class com._1c.g5.v8.dt.compare.ui.partialmodel.node.AbstractPartialModelNode
canExpand, getClosestDirectParent, getComparisonSession, getCustomMergeSettingsStatus, 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
setGrayed
-
Methods inherited from interface com._1c.g5.v8.dt.compare.ui.partialmodel.node.IPartialModelNode
addChild, canExpand, getChildren, getComparisonSession, getCustomMergeSettingsStatus, getNodeId, getParent, getSide, getSortedChildren, getStatus, hasChildren, retrieveComparisonNode, setCustomMergeSettingsStatus, setParent, setStatus
-
-
-
-
Constructor Detail
-
ProjectPartialModelNode
public ProjectPartialModelNode(IComparisonSession comparisonSession)
Constructs a root project node.- Parameters:
comparisonSession
- the comparison session, can not benull
-
-
Method Detail
-
canHaveChildren
public boolean canHaveChildren()
Description copied from interface:IDirectPartialModelNode
Checks if this node can have children.- Returns:
true
if the node can have children
-
isChecked
public boolean isChecked()
Description copied from interface:IPartialModelNode
Checks whether this node is checked.- Specified by:
isChecked
in interfaceIPartialModelNode
- Overrides:
isChecked
in classAbstractDirectPartialModelNode
- 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
- Overrides:
isCheckable
in classAbstractDirectPartialModelNode
- Returns:
true
if the node is checkable, andfalse
otherwise
-
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.- Specified by:
isGrayed
in interfaceIPartialModelNode
- Overrides:
isGrayed
in classAbstractPartialModelNodeWithChildren
- Returns:
true
if the node's checkbox is grayed
-
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
- Overrides:
hasDifferences
in classAbstractDirectPartialModelNode
- 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
- Overrides:
hasChanged
in classAbstractDirectPartialModelNode
- 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
-
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
- Overrides:
hasDoubleChanges
in classAbstractDirectPartialModelNode
- 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
- Overrides:
hasPotentialMergeProblems
in classAbstractDirectPartialModelNode
- 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
- Overrides:
getTooltipText
in classAbstractDirectPartialModelNode
- Returns:
- the text to be displayed as tooltip or
null
if no tooltip to be displayed
-
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
- Overrides:
hasOnlyOnOneSide
in classAbstractDirectPartialModelNode
- 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
-
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
- Overrides:
hasUnchanged
in classAbstractDirectPartialModelNode
- 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.
-
getImage
public org.eclipse.swt.graphics.Image getImage()
Description copied from interface:IPartialModelNode
Returns the node image.- Specified by:
getImage
in interfaceIPartialModelNode
- Overrides:
getImage
in classAbstractPartialModelNode
- Returns:
- the node image
-
getLabel
public String getLabel()
Description copied from interface:IPartialModelNode
Returns the node label.- Specified by:
getLabel
in interfaceIPartialModelNode
- Overrides:
getLabel
in classAbstractDirectPartialModelNode
- Returns:
- the node label
-
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
- Overrides:
getSideLabel
in classAbstractDirectPartialModelNode
- Parameters:
side
- the side of the node- Returns:
- a label
-
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
-
-