Interface IPartialModelNode
-
- All Superinterfaces:
IComparedElement
- All Known Subinterfaces:
ICollectionPartialNode
,IDirectPartialModelNode
,IMergeRulePartialModelNode
,INodeWithAddibleChildren
,IOrderMergeRulePartialModelNode
,IPartialEqualFeatureNode
,IPartialEqualNode
,IPartialFeatureNode
,IPartialListElementNode
- All Known Implementing Classes:
AbstractDirectPartialModelNode
,AbstractEqualNodeWithChildren
,AbstractNodeWithLabels
,AbstractNodeWithLabelsAndChildren
,AbstractPartialModelNode
,AbstractPartialModelNodeWithChildren
,EmfFeatureNodeWithChildren
,EmfFeatureTerminalNode
,EqualEmfFeatureNodeWithChildren
,EqualEmfFeatureTerminalNode
,EqualListElementNodeWithChildren
,EqualListElementTerminalNode
,EqualReferenceListElementTerminalNode
,ExternalPropertyPartialModelNode
,ListElementNodeWithChildren
,ListElementTerminalNode
,ProjectPartialModelNode
,RootPartialModelNode
,VirtualFolderPartialModelNode
public interface IPartialModelNode extends IComparedElement
A node of the partial model.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addChild(IPartialModelNode node)
Adds the specified child node.boolean
canExpand()
Checks whether this node can be expanded with specific inner content.void
check(boolean checked)
Checks the node.Collection<IPartialModelNode>
getChildren()
Returns the child nodes.IComparisonSession
getComparisonSession()
Gets the comparison session associated with this partial node.CustomMergeSettingsStatus
getCustomMergeSettingsStatus()
Returns the custom merge settings status of this node.org.eclipse.swt.graphics.Image
getImage()
Returns the node image.String
getLabel()
Returns the node label.long
getNodeId()
Gets BM id of a comparison node associated with this UI partial node.IPartialModelNode
getParent()
Returns the parent node.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.String
getSideLabel(ComparisonSide side)
Returns a label (textual representation) of the value referred from the specified side of the node.Object[]
getSortedChildren()
Returns an array of children according to this node's logic.ComparisonNodeStatus
getStatus()
Returns the status of the node in the comparison process.String
getTooltipText()
Returns node's tooltip text.boolean
hasChildren()
Checks if the node has child nodes.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
prioritize()
Prioritize the node comparison in the specified session.ComparisonNode
retrieveComparisonNode()
Retrieves the corresponding comparison model node.void
setChecked(boolean value)
Sets the "Checked" state of the partial model node.void
setCustomMergeSettingsStatus(CustomMergeSettingsStatus customMergeSettingsStatus)
Sets the custom merge settings status to the node.IPartialModelNode
setParent(IPartialModel partialModel, IPartialModelNode parent)
Sets the specified parent and includes this node in the list of its children.void
setStatus(ComparisonNodeStatus value)
Sets the status of the node.-
Methods inherited from interface com._1c.g5.v8.dt.compare.model.IComparedElement
hasChanged, hasDifferences, hasDoubleChanges, hasOnlyOnOneSide, hasOrderChanged, hasPotentialMergeProblems, hasUnchanged
-
-
-
-
Method Detail
-
getParent
IPartialModelNode getParent()
Returns the parent node.- Returns:
- the parent node
-
setParent
IPartialModelNode setParent(IPartialModel partialModel, IPartialModelNode parent)
Sets the specified parent and includes this node in the list of its children.- Parameters:
partialModel
- the partial modelparent
- the parent node- Returns:
- this node
-
hasChildren
boolean hasChildren()
Checks if the node has child nodes.- Returns:
true
if the node has children, andfalse
otherwise
-
getChildren
Collection<IPartialModelNode> getChildren()
Returns the child nodes. The order of child nodes is not defined.- Returns:
- the child nodes
-
addChild
void addChild(IPartialModelNode node)
Adds the specified child node.- Parameters:
node
- the node to add as a child
-
getImage
org.eclipse.swt.graphics.Image getImage()
Returns the node image.- Returns:
- the node image
-
getLabel
String getLabel()
Returns the node label.- Returns:
- the node label
-
getSortedChildren
Object[] getSortedChildren()
Returns an array of children according to this node's logic.- Returns:
- a sorted array of child nodes
-
getStatus
ComparisonNodeStatus getStatus()
Returns the status of the node in the comparison process.- Returns:
- node's current status during comparison
-
getSideLabel
String getSideLabel(ComparisonSide side)
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
-
getSide
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.- Returns:
- the MAIN or OTHER side or
null
if the compared object presents on both sides
-
isCheckable
boolean isCheckable()
Checks if the node is checkable.- Returns:
true
if the node is checkable, andfalse
otherwise
-
isChecked
boolean isChecked()
Checks whether this node is checked.- Returns:
true
if the node is checked, andfalse
otherwise
-
setChecked
void setChecked(boolean value)
Sets the "Checked" state of the partial model node.- Parameters:
value
- the value to set
-
isGrayed
boolean isGrayed()
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
-
check
void check(boolean checked)
Checks the node. It changes node's state in the model and sets corresponding flag in the partial model node.- Parameters:
checked
-true
to check,false
to uncheck
-
prioritize
void prioritize()
Prioritize the node comparison in the specified session.
-
canExpand
boolean canExpand()
Checks whether this node can be expanded with specific inner content.- Returns:
true
if the node can be expanded with inner elements
-
setStatus
void setStatus(ComparisonNodeStatus value)
Sets the status of the node.- Parameters:
status
- the status to set
-
getCustomMergeSettingsStatus
CustomMergeSettingsStatus getCustomMergeSettingsStatus()
Returns the custom merge settings status of this node.- Returns:
- the custom merge settings status, never
null
-
setCustomMergeSettingsStatus
void setCustomMergeSettingsStatus(CustomMergeSettingsStatus customMergeSettingsStatus)
Sets the custom merge settings status to the node.- Parameters:
customMergeSettingsStatus
- the status to set, can not benull
-
getTooltipText
String getTooltipText()
Returns node's tooltip text.- Returns:
- the text to be displayed as tooltip or
null
if no tooltip to be displayed
-
getNodeId
long getNodeId()
Gets BM id of a comparison node associated with this UI partial node.- Returns:
- the BM id or -1 if no comparison node associated
-
getComparisonSession
IComparisonSession getComparisonSession()
Gets the comparison session associated with this partial node.- Returns:
- the comparison session or
null
if no associated session
-
retrieveComparisonNode
ComparisonNode retrieveComparisonNode()
Retrieves the corresponding comparison model node.- Returns:
- the comparison model node or
null
if no comparison node associated
-
-