Interface IPartialModelNode
- All Superinterfaces:
IComparedElement
- All Known Subinterfaces:
ICollectionPartialNode,IDirectPartialModelNode,IFragmentPartialNode,IMergeRulePartialModelNode,INodeWithAddibleChildren,IOrderMergeRulePartialModelNode,IPartialEqualFeatureNode,IPartialEqualNode,IPartialFeatureNode,IPartialListElementNode,IPartialObjectRightNode,IPartialObjectRightsNode,IPartialRoleRightsNode,IPartialRoleTemplateNode
- All Known Implementing Classes:
AbstractDirectPartialModelNode,AbstractEqualNodeWithChildren,AbstractNodeWithLabels,AbstractNodeWithLabelsAndChildren,AbstractPartialModelNode,AbstractPartialModelNodeWithChildren,BslModuleSectionPartialModelNode,EmfFeatureNodeWithChildren,EmfFeatureTerminalNode,EqualEmfFeatureNodeWithChildren,EqualEmfFeatureTerminalNode,EqualFragmentPartialNode,EqualListElementNodeWithChildren,EqualListElementTerminalNode,EqualObjectRightsNodeWithChildren,EqualObjectRightTerminalNode,EqualReferenceListElementTerminalNode,EqualRoleRightsTerminalNode,EqualRoleTemplateTerminalNode,ExternalPropertyPartialModelNode,FragmentPartialNode,HtmlDocumentPageTerminalNode,ListElementNodeWithChildren,ListElementTerminalNode,ObjectRightsNodeWithChildren,ObjectRightTerminalNode,ProjectPartialModelNode,RoleRightsTerminalNode,RoleTemplateTerminalNode,RootPartialModelNode,VirtualFolderPartialModelNode
A node of the partial model.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(IPartialModelNode node) Adds the specified child node.booleanChecks whether this node can be expanded with specific inner content.voidcheck(boolean checked) Checks the node.Returns the child nodes.Gets the comparison session associated with this partial node.Returns the custom merge settings status of this node.org.eclipse.swt.graphics.ImagegetImage()Returns the node image.getLabel()Returns the node label.longGets BM id of a comparison node associated with this UI partial node.Returns the parent node.getSide()If the compared object presents only on MAIN or on OTHER side and is absent on the other one, that side is returned.getSideLabel(ComparisonSide side) Returns a label (textual representation) of the value referred from the specified side of the node.Object[]Returns an array of children according to this node's logic.Returns the status of the node in the comparison process.Returns node's tooltip text.booleanChecks if the node has child nodes.booleanChecks if the node is checkable.booleanChecks whether this node is checked.booleanisGrayed()Checks whether the checkbox of this node is grayed if applicable (i.e. it has some children checked and others unchecked).voidPrioritize the node comparison in the specified session.Retrieves the corresponding comparison model node.voidsetChecked(boolean value) Sets the "Checked" state of the partial model node.voidsetCustomMergeSettingsStatus(CustomMergeSettingsStatus customMergeSettingsStatus) Sets the custom merge settings status to the node.setParent(IPartialModel partialModel, IPartialModelNode parent) Sets the specified parent and includes this node in the list of its children.voidsetStatus(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 Details
-
getParent
IPartialModelNode getParent()Returns the parent node.- Returns:
- the parent node
-
setParent
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:
trueif the node has children, andfalseotherwise
-
getChildren
Collection<IPartialModelNode> getChildren()Returns the child nodes. The order of child nodes is not defined.- Returns:
- the child nodes
-
addChild
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
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
nullif the compared object presents on both sides
-
isCheckable
boolean isCheckable()Checks if the node is checkable.- Returns:
trueif the node is checkable, andfalseotherwise
-
isChecked
boolean isChecked()Checks whether this node is checked.- Returns:
trueif the node is checked, andfalseotherwise
-
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:
trueif 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-trueto check,falseto 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:
trueif the node can be expanded with inner elements
-
setStatus
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
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
nullif 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
nullif no associated session
-
retrieveComparisonNode
ComparisonNode retrieveComparisonNode()Retrieves the corresponding comparison model node.- Returns:
- the comparison model node or
nullif no comparison node associated
-