Class RightsPartialModelController
- java.lang.Object
- 
- com._1c.g5.v8.dt.compare.ui.partialmodel.AbstractEmfBasedPartialModelController
- 
- com._1c.g5.v8.dt.md.compare.ui.AbstractMdAwarePartialModelController
- 
- com._1c.g5.v8.dt.rights.compare.ui.RightsPartialModelController
 
 
 
- 
- All Implemented Interfaces:
- IPartialModelControllerDelegate
 
 public class RightsPartialModelController extends AbstractMdAwarePartialModelController Partial model controller for role's rights.
- 
- 
Field Summary- 
Fields inherited from class com._1c.g5.v8.dt.compare.ui.partialmodel.AbstractEmfBasedPartialModelControllerscopeProvider, symbolicLinkLocalizer
 
- 
 - 
Constructor SummaryConstructors Constructor Description RightsPartialModelController(ISymbolicLinkLocalizer symbolicLinkLocalizer, IBmRightsIndexManager bmRightsIndexManager, org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider, IResourceLookup resourceLookup, IModelObjectTreeSearchEngine searchEngine, IBmModelManager bmModelManager, IBmEmfIndexManager bmEmfIndexManager, IIndexSlicePredicateService slicePredicateService, IFilterBySubsystemsManager filterBySubsystemsManager, IDtProjectManager dtProjectManager)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancompareUsingExternalTool(IPartialModelNode node, org.eclipse.swt.widgets.Shell shell, String mainComparisonSideName, String otherComparisonSideName)Compares the specified node using external tool if the node is supported.protected IPartialFeatureNodecreateFeatureNode(IPartialModelNode parent, AbstractComparedEmfObjects<?> comparedParentObjects, ComparisonNode comparisonNode, org.eclipse.emf.ecore.EStructuralFeature feature, String mainLabel, String otherLabel, IComparisonSession session, ComparisonContext comparisonContext)Creates the node for feature.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.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.protected List<IPartialFeatureNode>getChildrenFeatureNodes(IPartialModel partialModel, AbstractPartialModelNode node, IComparisonSession session, ILinkRepresentationSupport linkRepresentationSupport, Collection<IPartialModelNode> output, ComparisonContext comparisonContext)protected StringgetSingleRepresentation(IComparisonDataSource dataSource, org.eclipse.emf.ecore.EObject context, Object value, org.eclipse.emf.ecore.EStructuralFeature feature)IPartialModelNode[]getTopNodes(IPartialModel partialModel)Returns a sorted array of top nodes of the specified partial model.protected booleanisSupported(ComparisonNode node)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.IPartialModelNodepositionChildNode(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.protected voidregisterInnerElementSuppliers(Consumer<IInnerElementSupplier> collector)Gets the collection of registered inner elements suppliers used to form the customized nodes of the partial model.booleansetMergeRule(IPartialModel partialModel, IComparisonSession comparisonSession, IMergeRulePartialModelNode originalNode, MergeRule rule, ComparisonContext comparisonContext)Handles the merge rule change.booleansupportsComparisonUsingExternalTool(IPartialModelNode node)Tells whether the delegate supports comparison using external tool of the specified node.booleansupportsMergingUsingExternalTool(IPartialModelNode node)Tells whether the delegate supports merging using external tool of the specified node.- 
Methods inherited from class com._1c.g5.v8.dt.md.compare.ui.AbstractMdAwarePartialModelControllerforEObject, getLocalizedStringMapRepresentation, getSingleValueRepresentation, getTypeRepresentation, getValueRepresentation, localizeSymbolicLink
 - 
Methods inherited from class com._1c.g5.v8.dt.compare.ui.partialmodel.AbstractEmfBasedPartialModelControlleraddFeatures, createEqualFeatureNode, createEqualNodesObjectsCollector, createInnerElements, createInnerElements, getBooleanRepresentation, getChildrenListNodes, getImageProvider, getListElementImageProvider, getRepresentation, getSymlink, isExpandableEqualNodeRequired, isExpandableFeatureNodeRequired, isExpandableNodeRequired, isTerminalNodeFeature
 
- 
 
- 
- 
- 
Constructor Detail- 
RightsPartialModelController@Inject public RightsPartialModelController(ISymbolicLinkLocalizer symbolicLinkLocalizer, IBmRightsIndexManager bmRightsIndexManager, org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider, IResourceLookup resourceLookup, IModelObjectTreeSearchEngine searchEngine, IBmModelManager bmModelManager, IBmEmfIndexManager bmEmfIndexManager, IIndexSlicePredicateService slicePredicateService, IFilterBySubsystemsManager filterBySubsystemsManager, IDtProjectManager dtProjectManager) 
 
- 
 - 
Method Detail- 
editMergeSettingspublic 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) Description copied from interface:IPartialModelControllerDelegateIf the node is supported, handles the editing of the specified node's merge settings.- Parameters:
- partialModel- the partial model
- node- the node to edit merge settings of
- comparisonSession- the comparison session
- 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
- Returns:
- trueif the node's merge settings have been successfully edited
 
 - 
fillNodePropertiespublic Collection<IPartialModelNode> fillNodeProperties(IPartialModel partialModel, IDirectPartialModelNode directNode, IComparisonSession session, ILinkRepresentationSupport linkRepresentationSupport, ComparisonContext comparisonContext) Description copied from interface:IPartialModelControllerDelegateFills properties of the specified direct partial model node according to the comparison model node.- Parameters:
- partialModel- the partial model hosting the direct node
- directNode- the direct node to fill properties for
- session- the comparison session
- comparisonContext- the comparison context, not- null
- 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)
 
 - 
getTopNodespublic IPartialModelNode[] getTopNodes(IPartialModel partialModel) Description copied from interface:IPartialModelControllerDelegateReturns a sorted array of top nodes of the specified partial model.- Parameters:
- partialModel- the partial model
- Returns:
- a sorted array of top nodes
 
 - 
positionChildNodepublic IPartialModelNode positionChildNode(IPartialModel partialModel, IPartialModelNode parentNode, ComparisonNode modelNode, IComparisonSession comparisonSession) Description copied from interface:IPartialModelControllerDelegateIf 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 model
- parentNode- the parent direct partial model node
- modelNode- the comparison model node to be positioned
- comparisonSession- the comparison session
- Returns:
- the positioned partial model node or nullif this controller does not support the specified model node
 
 - 
refreshNodepublic boolean refreshNode(IPartialModel partialModel, IPartialModelNode node, IComparisonSession comparisonSession) Description copied from interface:IPartialModelControllerDelegateRefreshes the partial model node properties according to the supported logic.- Parameters:
- partialModel- the partial model
- node- the partial model node to refresh
- comparisonSession- the comparison session
- Returns:
- trueif the controller supports this node
 
 - 
setMergeRulepublic boolean setMergeRule(IPartialModel partialModel, IComparisonSession comparisonSession, IMergeRulePartialModelNode originalNode, MergeRule rule, ComparisonContext comparisonContext) Description copied from interface:IPartialModelControllerDelegateHandles the merge rule change.- Parameters:
- partialModel- the partial model
- comparisonSession- the comparison session
- originalNode- the node in which the rule has been set
- rule- the rule value that has been set
- comparisonContext- the comparison context, not- null
- Returns:
- trueif this controller supported the operation for the provided arguments
 
 - 
supportsComparisonUsingExternalToolpublic boolean supportsComparisonUsingExternalTool(IPartialModelNode node) Description copied from interface:IPartialModelControllerDelegateTells whether the delegate supports comparison using external tool of the specified node.- Parameters:
- node- the partial mode node, cannot be- null
- Returns:
- trueif the delegate supports comparison using external tool,- falseotherwise
 
 - 
compareUsingExternalToolpublic boolean compareUsingExternalTool(IPartialModelNode node, org.eclipse.swt.widgets.Shell shell, String mainComparisonSideName, String otherComparisonSideName) Description copied from interface:IPartialModelControllerDelegateCompares the specified node using external tool if the node is supported.- 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
- Returns:
- trueif the node is supported to be compared using external tool,- falseotherwise
 
 - 
supportsMergingUsingExternalToolpublic boolean supportsMergingUsingExternalTool(IPartialModelNode node) Description copied from interface:IPartialModelControllerDelegateTells whether the delegate supports merging using external tool of the specified node.- Parameters:
- node- the partial mode node, cannot be- null
- Returns:
- trueif the delegate supports merging using external tool,- falseotherwise
 
 - 
mergeUsingExternalToolpublic boolean mergeUsingExternalTool(IPartialModel partialModel, IPartialModelNode node, org.eclipse.swt.widgets.Shell shell, String mainComparisonSideName, String otherComparisonSideName) Description copied from interface:IPartialModelControllerDelegateMerges the specified node using external tool if the node is supported.- 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
- Returns:
- trueif the node is supported to be merged using external tool,- falseotherwise
 
 - 
createFeatureNodeprotected IPartialFeatureNode createFeatureNode(IPartialModelNode parent, AbstractComparedEmfObjects<?> comparedParentObjects, ComparisonNode comparisonNode, org.eclipse.emf.ecore.EStructuralFeature feature, String mainLabel, String otherLabel, IComparisonSession session, ComparisonContext comparisonContext) Description copied from class:AbstractEmfBasedPartialModelControllerCreates the node for feature.- Overrides:
- createFeatureNodein class- AbstractEmfBasedPartialModelController
- Parameters:
- parent- the parent node.
- comparedParentObjects- the parent node compared objects.
- comparisonNode- the related comparison node.
- feature- the feature.
- mainLabel- the main label.
- otherLabel- the other label.
- session- the comparison session.
- comparisonContext- the comparison context, not- null
- Returns:
- the created node, never null.
 
 - 
getChildrenFeatureNodesprotected List<IPartialFeatureNode> getChildrenFeatureNodes(IPartialModel partialModel, AbstractPartialModelNode node, IComparisonSession session, ILinkRepresentationSupport linkRepresentationSupport, Collection<IPartialModelNode> output, ComparisonContext comparisonContext) - Overrides:
- getChildrenFeatureNodesin class- AbstractEmfBasedPartialModelController
 
 - 
getSingleRepresentationprotected String getSingleRepresentation(IComparisonDataSource dataSource, org.eclipse.emf.ecore.EObject context, Object value, org.eclipse.emf.ecore.EStructuralFeature feature) - Overrides:
- getSingleRepresentationin class- AbstractMdAwarePartialModelController
 
 - 
isSupportedprotected boolean isSupported(ComparisonNode node) - Specified by:
- isSupportedin class- AbstractEmfBasedPartialModelController
 
 - 
registerInnerElementSuppliersprotected void registerInnerElementSuppliers(Consumer<IInnerElementSupplier> collector) Description copied from class:AbstractEmfBasedPartialModelControllerGets the collection of registered inner elements suppliers used to form the customized nodes of the partial model.- Overrides:
- registerInnerElementSuppliersin class- AbstractMdAwarePartialModelController
- Parameters:
- collector- Supplier collector.
 
 
- 
 
-