Class AbstractPartialModelNodeWithChildren

    • Constructor Detail

      • AbstractPartialModelNodeWithChildren

        protected AbstractPartialModelNodeWithChildren​(IPartialModelNode parent,
                                                       ComparisonTreeNode comparisonNode,
                                                       IComparisonSession comparisonSession)
        Constructs a node.
        Parameters:
        parent - the parent of the constructed node, may be null
        comparisonNode - the model node, may be null
        comparisonSession - the comparison session
      • AbstractPartialModelNodeWithChildren

        protected AbstractPartialModelNodeWithChildren​(ComparisonTreeNode comparisonNode,
                                                       IComparisonSession comparisonSession)
        Constructs a node without a parent.
        Parameters:
        comparisonNode - the model node, may be null
        comparisonSession - the comparison session
    • 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
      • removeChild

        public void removeChild​(IPartialModelNode child)
        Removes the specified child. This is a low-level method and it may only be called by the partial model owner.
        Parameters:
        child - the child to remove
      • to

        public VirtualFolderPartialModelNode to​(IPartialModel partialModel,
                                                VirtualFolderDescriptor virtualFolderDescriptor)
        Returns a child virtual folder node with the specified descriptor. In case of absence creates one.
        Parameters:
        partialModel - the partial model, not null
        virtualFolderDescriptor - the descriptor, not null
        Returns:
        a child virtual folder partial model, not null
      • to

        public AbstractPartialModelNodeWithChildren to​(IPartialModel partialModel,
                                                       VirtualFolderDescriptor... descriptors)
        Returns a partial model node corresponding to the specified path defined by an array of descriptors, starting from this node. In case of absence of nodes on the path, creates them.
        Parameters:
        partialModel - the partial model, not null
        descriptors - the array of descriptors defining the path, not null
        Returns:
        the node defined by the path
      • getChildFolderDescriptors

        public abstract VirtualFolderDescriptor[] getChildFolderDescriptors()
        Returns an order-defining array of possible child folder descriptors of this node.
        Returns:
        array of child folder descriptors, never null
      • 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
      • setStatus

        public void setStatus​(ComparisonNodeStatus status)
        Sets the status of the node.
        Parameters:
        status - the status 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
      • setGrayed

        public void setGrayed​(boolean grayed)
        Sets the "grayed" value of the node
        Parameters:
        grayed - the "grayed" value