Class PartialModelController
- java.lang.Object
- 
- com._1c.g5.v8.dt.compare.ui.partialmodel.PartialModelController
 
- 
- All Implemented Interfaces:
- IManagedService
 
 public class PartialModelController extends Object implements IManagedService The partial model controller working with a specified comparison session and delegating operations to a collection of specific controllers defined in extensions.
- 
- 
Constructor SummaryConstructors Constructor Description PartialModelController()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()List<IPartialModelNode>check(IPartialModel partialModel, IPartialModelNode node, boolean checked, IComparisonSession comparisonSession)Checks or unchecks a partial model node.voidcompareUsingExternalTool(IPartialModelNode node, org.eclipse.swt.widgets.Shell shell, String mainComparisonSideName, String otherComparisonSideName)Compares the specified node using external tool.voidcreateDirectNodeChildren(IPartialModel partialModel, IDirectPartialModelNode directNode, ILinkRepresentationSupport linkRepresentationSupport, IDtComparisonViewRefresher refresher, ComparisonContext comparisonContext)Creates child nodes for the specified direct node of a partial model.voiddeactivate()voideditMergeSettings(IPartialModel partialModel, IPartialModelNode node, IComparisonSession comparisonSession, org.eclipse.swt.widgets.Shell shell, boolean readOnly, org.eclipse.swt.graphics.Color colorHasDiffs, org.eclipse.swt.graphics.Color colorOnlyMain, org.eclipse.swt.graphics.Color colorOnlyOther, String mainComparisonSideName, String otherComparisonSideName, DtComparisonView parentComparisonView, ISelectionProviderDelegate selectionProviderDelegate, org.eclipse.jface.resource.ResourceManager resourceManager)Edits merge settings of the specified partial model node in the UI.List<IPartialModelNode>getAllChildren(IPartialModelNode node)Gets list of all children together with sub-children of the specified node.Object[]getChildren(Object parentElement, IPartialModel partialModel, ILinkRepresentationSupport linkRepresentationSupport, IDtComparisonViewRefresher refresher, IComparisonSession comparisonSession)Returns the children of the specified parent element.ObjectgetParent(Object element)Returns the parent of the specified element.Object[]getTopNodes(IPartialModel partialModel, ILinkRepresentationSupport linkRepresentationSupport, IDtComparisonViewRefresher refresher, ComparisonContext comparisonContext)Gets top nodes for the specified partial model.booleanhasChildren(Object element)Checks whether the specified element has children.voidmergeUsingExternalTool(IPartialModel partialModel, IPartialModelNode node, org.eclipse.swt.widgets.Shell shell, String mainComparisonSideName, String otherComparisonSideName)Merges the specified node using external tool.booleanpositionChildNode(IPartialModel partialModel, IPartialModelNode parentNode, ComparisonNode modelNode, IComparisonSession comparisonSession)Positions the specified comparison model node in a subtree of the specified partial model node.voidrefreshNodes(IPartialModel partialModel, Collection<IPartialModelNode> nodes, IComparisonSession comparisonSession)Refreshes the properties of the specified nodes.voidrefreshNodeWithChildren(IPartialModel partialModel, IPartialModelNode node, IComparisonSession comparisonSession)Refreshes the properties of the specified node and all its children.voidsetMergeRule(IPartialModel partialModel, IMergeRulePartialModelNode node, MergeRule rule, IComparisonSession comparisonSession)Sets the merge rule for the specified partial model node.booleansupportsComparisonUsingExternalTool(IPartialModelNode node)Tells whether the specified node supports comparison using external tool.booleansupportsMergingUsingExternalTool(IPartialModelNode node)Tells whether the specified node supports merging using external tool.
 
- 
- 
- 
Method Detail- 
activatepublic void activate() - Specified by:
- activatein interface- IManagedService
 
 - 
deactivatepublic void deactivate() - Specified by:
- deactivatein interface- IManagedService
 
 - 
createDirectNodeChildrenpublic void createDirectNodeChildren(IPartialModel partialModel, IDirectPartialModelNode directNode, ILinkRepresentationSupport linkRepresentationSupport, IDtComparisonViewRefresher refresher, ComparisonContext comparisonContext) Creates child nodes for the specified direct node of a partial model.- Parameters:
- partialModel- the partial model, can not be- null
- directNode- the direct node, can not be- null
- linkRepresentationSupport- the link representation support, can not be- null
- refresher- the refresher, can not be- null
- comparisonContext- the comparison context, not- null
 
 - 
positionChildNodepublic boolean positionChildNode(IPartialModel partialModel, IPartialModelNode parentNode, ComparisonNode modelNode, IComparisonSession comparisonSession) Positions the specified comparison model node in a subtree of the specified partial model node. This may involve creation of additional (intermediate) subparents for hosting the positioned node.- Parameters:
- partialModel- the partial model, can not be- null
- parentNode- the parent partial model node, can not be- null
- modelNode- the comparison model node to be positioned, can not be- null
- comparisonSession- the comparison session, can not be- null
- Returns:
- trueif the node was positioned successfully
 
 - 
getTopNodespublic Object[] getTopNodes(IPartialModel partialModel, ILinkRepresentationSupport linkRepresentationSupport, IDtComparisonViewRefresher refresher, ComparisonContext comparisonContext) Gets top nodes for the specified partial model.- Parameters:
- partialModel- the partial model to get top nodes for, can not be- null
- linkRepresentationSupport- the link representation support, can not be- null
- refresher- the refresher, can not be- null
- comparisonContext- the comparison context, not- null
- Returns:
- an array of top nodes, may be null
 
 - 
editMergeSettingspublic void editMergeSettings(IPartialModel partialModel, IPartialModelNode node, IComparisonSession comparisonSession, org.eclipse.swt.widgets.Shell shell, boolean readOnly, org.eclipse.swt.graphics.Color colorHasDiffs, org.eclipse.swt.graphics.Color colorOnlyMain, org.eclipse.swt.graphics.Color colorOnlyOther, String mainComparisonSideName, String otherComparisonSideName, DtComparisonView parentComparisonView, ISelectionProviderDelegate selectionProviderDelegate, org.eclipse.jface.resource.ResourceManager resourceManager) Edits merge settings of the specified partial model node in the UI.- Parameters:
- partialModel- the partial model, can not be- null
- node- the node with merge settings to be edited, can not be- null
- comparisonSession- the comparison session, can not be- null
- shell- the parent shell, can not be- null
- readOnly-- trueif it is possible to set merge settings and- falseif it is only possible to view the difference in node
- colorHasDiffs- the color for 'node has diffs' case, cannot be- null.
- colorOnlyMain- the color for 'node has only main object' case, cannot be- null.
- colorOnlyOther- the color for 'node has only other object' case, cannot be- null.
- mainComparisonSideName- the main comparison side name, cannot be- null.
- otherComparisonSideName- the other comparison side name, cannot be- null.
- parentComparisonView- the parent comparison view this dialog was called from, cannot be- null
- selectionProviderDelegate- the selection provider delegate, cannot be- null.
- resourceManager- the resource manager, cannot be- null
 
 - 
refreshNodespublic void refreshNodes(IPartialModel partialModel, Collection<IPartialModelNode> nodes, IComparisonSession comparisonSession) Refreshes the properties of the specified nodes.- Parameters:
- partialModel- the partial model, can not be- null
- nodes- the partial nodes to refresh, can not be- null
- comparisonSession- the comparison session, can not be- null
 
 - 
refreshNodeWithChildrenpublic void refreshNodeWithChildren(IPartialModel partialModel, IPartialModelNode node, IComparisonSession comparisonSession) Refreshes the properties of the specified node and all its children.- Parameters:
- partialModel- the partial model, can not be- null
- node- the partial node to refresh, can not be- null
- comparisonSession- the comparison session, can not be- null
 
 - 
setMergeRulepublic void setMergeRule(IPartialModel partialModel, IMergeRulePartialModelNode node, MergeRule rule, IComparisonSession comparisonSession) Sets the merge rule for the specified partial model node.- Parameters:
- partialModel- the partial model, can not be- null
- node- the node, can not be- null
- rule- the merge rule, can not be- null
- comparisonSession- the comparison session, can not be- null
 
 - 
checkpublic List<IPartialModelNode> check(IPartialModel partialModel, IPartialModelNode node, boolean checked, IComparisonSession comparisonSession) Checks or unchecks a partial model node.- Parameters:
- partialModel- the partial model, can not be- null
- node- the node to modify the "Checked" flag, can not be- null
- checked- the check value
- comparisonSession- the comparison session, can not be- null
- Returns:
- list of nodes which state has been possibly updated, never null
 
 - 
getChildrenpublic Object[] getChildren(Object parentElement, IPartialModel partialModel, ILinkRepresentationSupport linkRepresentationSupport, IDtComparisonViewRefresher refresher, IComparisonSession comparisonSession) Returns the children of the specified parent element.- Parameters:
- parentElement- the parent element to get children for, can not be- null
- partialModel- the partial model, can not be- null
- linkRepresentationSupport- the link representation support, can not be- null'
- refresher- the refresher, can not be- null
- comparisonSession- the comparison session, can not be- null
- Returns:
- an array of children of the parent element or nullif no children are available
 
 - 
getParentpublic Object getParent(Object element) Returns the parent of the specified element.- Parameters:
- element- the element to get parent for, can not be- null
- Returns:
- parent or null
 
 - 
hasChildrenpublic boolean hasChildren(Object element) Checks whether the specified element has children.- Parameters:
- element- the parent, can not be- null
- Returns:
- trueif the element has children
 
 - 
supportsComparisonUsingExternalToolpublic boolean supportsComparisonUsingExternalTool(IPartialModelNode node) Tells whether the specified node supports comparison using external tool.- Parameters:
- node- the partial model node, cannot be- null
- Returns:
- trueif the specified node supports comparison using external tool,- falseotherwise
 
 - 
compareUsingExternalToolpublic void compareUsingExternalTool(IPartialModelNode node, org.eclipse.swt.widgets.Shell shell, String mainComparisonSideName, String otherComparisonSideName) Compares the specified node using external tool.- Parameters:
- node- the partial node to compare using external tool, cannot be- null
- shell- the parent shell, cannot be- null
- mainComparisonSideName- the main comparison side name, cannot be- null
- otherComparisonSideName- the other comparison side name, cannot be- null
 
 - 
supportsMergingUsingExternalToolpublic boolean supportsMergingUsingExternalTool(IPartialModelNode node) Tells whether the specified node supports merging using external tool.- Parameters:
- node- the partial model node, cannot be- null
- Returns:
- trueif the specified node supports merging using external tool,- falseotherwise
 
 - 
mergeUsingExternalToolpublic void mergeUsingExternalTool(IPartialModel partialModel, IPartialModelNode node, org.eclipse.swt.widgets.Shell shell, String mainComparisonSideName, String otherComparisonSideName) Merges the specified node using external tool.- Parameters:
- partialModel- the partial model, cannot be- null
- node- the partial node to merge using external tool, cannot be- null
- shell- the parent shell, cannot be- null
- mainComparisonSideName- the main comparison side name, cannot be- null
- otherComparisonSideName- the other comparison side name, cannot be- null
 
 - 
getAllChildrenpublic List<IPartialModelNode> getAllChildren(IPartialModelNode node) Gets list of all children together with sub-children of the specified node.- Parameters:
- node- the node to collect children for, cannot be- null
- Returns:
- the list of recursively collected children, never null
 
 
- 
 
-