Class AbstractEmfBasedPartialModelController
- java.lang.Object
- 
- com._1c.g5.v8.dt.compare.ui.partialmodel.AbstractEmfBasedPartialModelController
 
- 
- All Implemented Interfaces:
- IPartialModelControllerDelegate
 - Direct Known Subclasses:
- AbstractMdAwarePartialModelController
 
 public abstract class AbstractEmfBasedPartialModelController extends Object implements IPartialModelControllerDelegate A specific partial model controller for EMF-based model elements.
- 
- 
Field SummaryFields Modifier and Type Field Description protected org.eclipse.xtext.scoping.IScopeProviderscopeProviderThe scope provider that may be used by the controller for symbolic link resolving.protected ISymbolicLinkLocalizersymbolicLinkLocalizerThe symbolic link localizer
 - 
Constructor SummaryConstructors Constructor Description AbstractEmfBasedPartialModelController(ISymbolicLinkLocalizer symbolicLinkLocalizer)Constructor.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddFeatures(IPartialModel partialModel, AbstractPartialModelNode node, IComparisonSession session, ILinkRepresentationSupport linkRepresentationSupport, Collection<IPartialModelNode> output, ComparisonContext comparisonContext)protected IPartialEqualFeatureNodecreateEqualFeatureNode(IPartialModelNode parent, AbstractComparedEmfObjects<?> comparedParentObjects, org.eclipse.emf.ecore.EStructuralFeature feature, String mainLabel, String otherLabel, IImageProvider imageProvider, IComparisonSession session, ComparisonContext comparisonContext)Creates equal partial node for the feature.protected EqualNodesObjectsCollectorcreateEqualNodesObjectsCollector()Creates a collector to collect child objects to create equal nodes for.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.Collection<IPartialModelNode>createInnerElements(IPartialModel partialModel, IPartialModelNode partialModelNode, IComparisonSession comparisonSession, ILinkRepresentationSupport linkRepresentationSupport, ComparisonContext comparisonContext)Creates inner elements for the specified partial model node.protected voidcreateInnerElements(AbstractNodeWithLabelsAndChildren forNode, IComparisonSession comparisonSession, IPartialModel partialModel, ILinkRepresentationSupport linkRepresentationSupport, Collection<IPartialModelNode> output, ComparisonContext comparisonContext)protected StringgetBooleanRepresentation(boolean value)protected List<IPartialFeatureNode>getChildrenFeatureNodes(IPartialModel partialModel, AbstractPartialModelNode node, IComparisonSession session, ILinkRepresentationSupport linkRepresentationSupport, Collection<IPartialModelNode> output, ComparisonContext comparisonContext)protected List<IPartialModelNode>getChildrenListNodes(IPartialModel partialModel, IPartialFeatureNode forNode, IComparisonSession session, ComparisonContext comparisonContext)protected IImageProvidergetImageProvider(org.eclipse.emf.ecore.EStructuralFeature feature)Returns the image provider for the given feature.protected IImageProvidergetListElementImageProvider(IComparedObjects<?> comparedObjects, IComparisonSession session)protected StringgetRepresentation(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IComparisonSession session, ComparisonSide side)protected StringgetSingleRepresentation(IComparisonDataSource dataSource, org.eclipse.emf.ecore.EObject context, Object value, org.eclipse.emf.ecore.EStructuralFeature feature)protected abstract StringgetSingleValueRepresentation(Object value)protected StringgetSymlink(IComparisonDataSource dataSource, org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, Object value)protected abstract StringgetValueRepresentation(IComparisonDataSource dataSource, org.eclipse.emf.ecore.EObject object, Object value, org.eclipse.emf.ecore.EStructuralFeature feature)protected booleanisExpandableEqualNodeRequired(AbstractComparedEmfObjects<?> comparedParentObjects, org.eclipse.emf.ecore.EStructuralFeature feature)Checks whether we need to build an expandable partial node with children for the equal node.protected booleanisExpandableFeatureNodeRequired(ComparisonNode node, AbstractComparedEmfObjects<?> comparedParentObjects, org.eclipse.emf.ecore.EStructuralFeature feature, IComparisonSession session)Checks whether we need to build an expandable partial node with children for the feature node.protected booleanisExpandableNodeRequired(Object object)Checks whether we need to build an expandable partial node with children for the specified object.protected abstract booleanisSupported(ComparisonNode node)protected booleanisTerminalNodeFeature(org.eclipse.emf.ecore.EStructuralFeature feature)Checks whether we need to build an terminal node for feature.protected abstract StringlocalizeSymbolicLink(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EStructuralFeature feature, String symlink)protected voidregisterInnerElementSuppliers(Consumer<IInnerElementSupplier> collector)Gets the collection of registered inner elements suppliers used to form the customized nodes of the partial model.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface com._1c.g5.v8.dt.compare.ui.partialmodel.IPartialModelControllerDelegatecompareUsingExternalTool, editMergeSettings, fillNodeProperties, getTopNodes, mergeUsingExternalTool, positionChildNode, refreshNode, setMergeRule, supportsComparisonUsingExternalTool, supportsMergingUsingExternalTool
 
- 
 
- 
- 
- 
Field Detail- 
scopeProviderprotected org.eclipse.xtext.scoping.IScopeProvider scopeProvider The scope provider that may be used by the controller for symbolic link resolving.
 - 
symbolicLinkLocalizerprotected final ISymbolicLinkLocalizer symbolicLinkLocalizer The symbolic link localizer
 
- 
 - 
Constructor Detail- 
AbstractEmfBasedPartialModelControllerpublic AbstractEmfBasedPartialModelController(ISymbolicLinkLocalizer symbolicLinkLocalizer) Constructor.- Parameters:
- symbolicLinkLocalizer- the symbolic link localizer, can not be- null
 
 
- 
 - 
Method Detail- 
createInnerElementspublic Collection<IPartialModelNode> createInnerElements(IPartialModel partialModel, IPartialModelNode partialModelNode, IComparisonSession comparisonSession, ILinkRepresentationSupport linkRepresentationSupport, ComparisonContext comparisonContext) Description copied from interface:IPartialModelControllerDelegateCreates inner elements for the specified partial model node.- Specified by:
- createInnerElementsin interface- IPartialModelControllerDelegate
- Parameters:
- partialModel- the partial model
- partialModelNode- the node of the partial model
- comparisonSession- the comparison session
- linkRepresentationSupport- the link respresentation support
- comparisonContext- the comparison context, not- null
- Returns:
- trueif this controller supported the operation for the provided arguments
 
 - 
getRepresentationprotected String getRepresentation(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IComparisonSession session, ComparisonSide side) 
 - 
getSingleRepresentationprotected String getSingleRepresentation(IComparisonDataSource dataSource, org.eclipse.emf.ecore.EObject context, Object value, org.eclipse.emf.ecore.EStructuralFeature feature) 
 - 
getValueRepresentationprotected abstract String getValueRepresentation(IComparisonDataSource dataSource, org.eclipse.emf.ecore.EObject object, Object value, org.eclipse.emf.ecore.EStructuralFeature feature) 
 - 
localizeSymbolicLinkprotected abstract String localizeSymbolicLink(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EStructuralFeature feature, String symlink) 
 - 
getSymlinkprotected String getSymlink(IComparisonDataSource dataSource, org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, Object value) 
 - 
getBooleanRepresentationprotected String getBooleanRepresentation(boolean value) 
 - 
addFeaturesprotected void addFeatures(IPartialModel partialModel, AbstractPartialModelNode node, IComparisonSession session, ILinkRepresentationSupport linkRepresentationSupport, Collection<IPartialModelNode> output, ComparisonContext comparisonContext) 
 - 
getChildrenFeatureNodesprotected List<IPartialFeatureNode> getChildrenFeatureNodes(IPartialModel partialModel, AbstractPartialModelNode node, IComparisonSession session, ILinkRepresentationSupport linkRepresentationSupport, Collection<IPartialModelNode> output, ComparisonContext comparisonContext) 
 - 
registerInnerElementSuppliersprotected void registerInnerElementSuppliers(Consumer<IInnerElementSupplier> collector) Gets the collection of registered inner elements suppliers used to form the customized nodes of the partial model.- Parameters:
- collector- Supplier collector.
 
 - 
createEqualNodesObjectsCollectorprotected EqualNodesObjectsCollector createEqualNodesObjectsCollector() Creates a collector to collect child objects to create equal nodes for. Descendants may provide own implementation.- Returns:
- the collector instance, never null
 
 - 
getChildrenListNodesprotected List<IPartialModelNode> getChildrenListNodes(IPartialModel partialModel, IPartialFeatureNode forNode, IComparisonSession session, ComparisonContext comparisonContext) 
 - 
getImageProviderprotected IImageProvider getImageProvider(org.eclipse.emf.ecore.EStructuralFeature feature) Returns the image provider for the given feature.- Parameters:
- feature- the feature to get the image provider for
- Returns:
- the image provider
 
 - 
getListElementImageProviderprotected IImageProvider getListElementImageProvider(IComparedObjects<?> comparedObjects, IComparisonSession session) 
 - 
isSupportedprotected abstract boolean isSupported(ComparisonNode node) 
 - 
createInnerElementsprotected void createInnerElements(AbstractNodeWithLabelsAndChildren forNode, IComparisonSession comparisonSession, IPartialModel partialModel, ILinkRepresentationSupport linkRepresentationSupport, Collection<IPartialModelNode> output, ComparisonContext comparisonContext) 
 - 
createEqualFeatureNodeprotected IPartialEqualFeatureNode createEqualFeatureNode(IPartialModelNode parent, AbstractComparedEmfObjects<?> comparedParentObjects, org.eclipse.emf.ecore.EStructuralFeature feature, String mainLabel, String otherLabel, IImageProvider imageProvider, IComparisonSession session, ComparisonContext comparisonContext) Creates equal partial node for the feature.- Parameters:
- parent- the parent node.
- comparedParentObjects- the parent node compared objects.
- feature- the feature.
- mainLabel- the representation of the main side.
- otherLabel- the representation of the other side.
- imageProvider- the image provider.
- session- the comparison session.
- comparisonContext- the comparison context.
- Returns:
- the created node, never null.
 
 - 
createFeatureNodeprotected IPartialFeatureNode createFeatureNode(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.- 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.
 
 - 
isExpandableFeatureNodeRequiredprotected boolean isExpandableFeatureNodeRequired(ComparisonNode node, AbstractComparedEmfObjects<?> comparedParentObjects, org.eclipse.emf.ecore.EStructuralFeature feature, IComparisonSession session) Checks whether we need to build an expandable partial node with children for the feature node.- Parameters:
- the- comparison node to check, cannot be- null
- comparedParentObjects- the triple of compared parent objects, cannot be- null
- feature- the feature to check, cannot be- null
- session- the comparison session, cannot be- null
- Returns:
- trueif expandable node with children required,- falseif terminal one required
 
 - 
isExpandableEqualNodeRequiredprotected boolean isExpandableEqualNodeRequired(AbstractComparedEmfObjects<?> comparedParentObjects, org.eclipse.emf.ecore.EStructuralFeature feature) Checks whether we need to build an expandable partial node with children for the equal node.- Parameters:
- comparedParentObjects- the triple of compared parent objects, cannot be- null
- feature- the feature to check, cannot be- null
- Returns:
- trueif expandable node with children required,- falseif terminal one required
 
 - 
isTerminalNodeFeatureprotected boolean isTerminalNodeFeature(org.eclipse.emf.ecore.EStructuralFeature feature) Checks whether we need to build an terminal node for feature.- Parameters:
- feature- the feature to check, cannot be- null
- Returns:
- trueif terminal node required,- falseif with children one required
 
 - 
isExpandableNodeRequiredprotected boolean isExpandableNodeRequired(Object object) Checks whether we need to build an expandable partial node with children for the specified object.- Parameters:
- object- the object to check, can be- null
- Returns:
- trueif expandable node with children required,- falseif terminal one required
 
 
- 
 
-