Interface IPartialModelControllerDelegate
- All Known Implementing Classes:
AbstractEmfBasedPartialModelController,AbstractMdAwarePartialModelController,AdditionalIndexesPartialModelController,BslModulePartialModelController,ChartPartialModelController,CmiPartialModelController,DcsPartialModelController,FormPartialModelController,HtmlDocumentPartialModelController,ManifestPartialModelController,MdObjectPartialModelController,RightsPartialModelController,SolidResourcePartialModelController,UnsupportedObjectPartialModelController
public interface IPartialModelControllerDelegate
A partial model controller delegate responsible for partial model modification and access to the comparison model.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancompareUsingExternalTool(IPartialModelNode node, org.eclipse.swt.widgets.Shell shell, String mainComparisonSideName, String otherComparisonSideName) Compares the specified node using external tool if the node is supported.createInnerElements(IPartialModel partialModel, IPartialModelNode partialModelNode, IComparisonSession comparisonSession, ILinkRepresentationSupport linkRepresentationSupport, ComparisonContext comparisonContext) Creates inner elements for the specified partial model node.booleaneditMergeSettings(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) If the node is supported, handles the editing of the specified node's merge settings.fillNodeProperties(IPartialModel partialModel, IDirectPartialModelNode directNode, IComparisonSession session, ILinkRepresentationSupport linkRepresentationSupport, ComparisonContext comparisonContext) Fills properties of the specified direct partial model node according to the comparison model node.getTopNodes(IPartialModel partialModel) Returns a sorted array of top nodes of the specified partial model.booleanmergeUsingExternalTool(IPartialModel partialModel, IPartialModelNode node, org.eclipse.swt.widgets.Shell shell, String mainComparisonSideName, String otherComparisonSideName) Merges the specified node using external tool if the node is supported.positionChildNode(IPartialModel partialModel, IPartialModelNode parentNode, ComparisonNode modelNode, IComparisonSession comparisonSession) If supported by this controller, positions the specified comparison model node in a subtree of the specified partial model node.booleanrefreshNode(IPartialModel partialModel, IPartialModelNode node, IComparisonSession comparisonSession) Refreshes the partial model node properties according to the supported logic.booleansetMergeRule(IPartialModel partialModel, IComparisonSession comparisonSession, IMergeRulePartialModelNode node, MergeRule rule, ComparisonContext comparisonContext) Handles the merge rule change.booleanTells whether the delegate supports comparison using external tool of the specified node.booleanTells whether the delegate supports merging using external tool of the specified node.
-
Method Details
-
positionChildNode
IPartialModelNode positionChildNode(IPartialModel partialModel, IPartialModelNode parentNode, ComparisonNode modelNode, IComparisonSession comparisonSession) If supported by this controller, 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 modelparentNode- the parent direct partial model nodemodelNode- the comparison model node to be positionedcomparisonSession- the comparison session- Returns:
- the positioned partial model node or
nullif this controller does not support the specified model node
-
fillNodeProperties
Collection<IPartialModelNode> fillNodeProperties(IPartialModel partialModel, IDirectPartialModelNode directNode, IComparisonSession session, ILinkRepresentationSupport linkRepresentationSupport, ComparisonContext comparisonContext) Fills properties of the specified direct partial model node according to the comparison model node.- Parameters:
partialModel- the partial model hosting the direct nodedirectNode- the direct node to fill properties forsession- the comparison sessioncomparisonContext- the comparison context, notnullcomparisonResultNode- the model node to fill the properties from- Returns:
nullif this controller does not support the input partial model node, or a collection of output nodes whose properties must be filled by the caller (may be empty)
-
getTopNodes
Returns a sorted array of top nodes of the specified partial model.- Parameters:
partialModel- the partial model- Returns:
- a sorted array of top nodes
-
editMergeSettings
boolean 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) If the node is supported, handles the editing of the specified node's merge settings.- Parameters:
partialModel- the partial modelnode- the node to edit merge settings ofcomparisonSession- the comparison sessionshell- the parent shell, can not benullreadOnly-trueif it is possible to set merge settings andfalseif it is only possible to view the difference in nodecolorHasDiffs- the color for 'node has diffs' case, cannot benull.colorOnlyMain- the color for 'node has only main object' case, cannot benull.colorOnlyOther- the color for 'node has only other object' case, cannot benull.mainComparisonSideName- the main comparison side name, cannot benull.otherComparisonSideName- the other comparison side name, cannot benull.parentComparisonView- the parent comparison view this dialog was called from, cannot benullselectionProviderDelegate- the selection provider delegate, cannot benull.resourceManager- the resource manager, cannot benull- Returns:
trueif the node's merge settings have been successfully edited
-
refreshNode
boolean refreshNode(IPartialModel partialModel, IPartialModelNode node, IComparisonSession comparisonSession) Refreshes the partial model node properties according to the supported logic.- Parameters:
partialModel- the partial modelnode- the partial model node to refreshcomparisonSession- the comparison session- Returns:
trueif the controller supports this node
-
setMergeRule
boolean setMergeRule(IPartialModel partialModel, IComparisonSession comparisonSession, IMergeRulePartialModelNode node, MergeRule rule, ComparisonContext comparisonContext) Handles the merge rule change.- Parameters:
partialModel- the partial modelcomparisonSession- the comparison sessionnode- the node in which the rule has been setrule- the rule value that has been setcomparisonContext- the comparison context, notnull- Returns:
trueif this controller supported the operation for the provided arguments
-
createInnerElements
Collection<IPartialModelNode> createInnerElements(IPartialModel partialModel, IPartialModelNode partialModelNode, IComparisonSession comparisonSession, ILinkRepresentationSupport linkRepresentationSupport, ComparisonContext comparisonContext) Creates inner elements for the specified partial model node.- Parameters:
partialModel- the partial modelpartialModelNode- the node of the partial modelcomparisonSession- the comparison sessionlinkRepresentationSupport- the link respresentation supportcomparisonContext- the comparison context, notnull- Returns:
trueif this controller supported the operation for the provided arguments
-
supportsComparisonUsingExternalTool
Tells whether the delegate supports comparison using external tool of the specified node.- Parameters:
node- the partial mode node, cannot benull- Returns:
trueif the delegate supports comparison using external tool,falseotherwise
-
compareUsingExternalTool
boolean compareUsingExternalTool(IPartialModelNode node, org.eclipse.swt.widgets.Shell shell, String mainComparisonSideName, String otherComparisonSideName) Compares the specified node using external tool if the node is supported.- Parameters:
node- the partial node to compare using external tool, cannot benullshell- the parent shell, cannot benullmainComparisonSideName- the main comparison side name, cannot benullotherComparisonSideName- the other comparison side name, cannot benull- Returns:
trueif the node is supported to be compared using external tool,falseotherwise
-
supportsMergingUsingExternalTool
Tells whether the delegate supports merging using external tool of the specified node.- Parameters:
node- the partial mode node, cannot benull- Returns:
trueif the delegate supports merging using external tool,falseotherwise
-
mergeUsingExternalTool
boolean mergeUsingExternalTool(IPartialModel partialModel, IPartialModelNode node, org.eclipse.swt.widgets.Shell shell, String mainComparisonSideName, String otherComparisonSideName) Merges the specified node using external tool if the node is supported.- Parameters:
partialModel- the partial model, cannot benullnode- the partial node to merge using external tool, cannot benullshell- the parent shell, cannot benullmainComparisonSideName- the main comparison side name, cannot benullotherComparisonSideName- the other comparison side name, cannot benull- Returns:
trueif the node is supported to be merged using external tool,falseotherwise
-