Class AbstractFeatureElementSupplier
- java.lang.Object
-
- com._1c.g5.v8.dt.compare.ui.partialmodel.AbstractElementSupplier
-
- com._1c.g5.v8.dt.compare.ui.partialmodel.AbstractFeatureElementSupplier
-
- All Implemented Interfaces:
IInnerElementSupplier
public abstract class AbstractFeatureElementSupplier extends AbstractElementSupplier
Abstract supplier of inner elements for some feature.
-
-
Field Summary
Fields Modifier and Type Field Description protected ISymbolicLinkLocalizer
symbolicLinkLocalizer
the symbolic link localizer
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractFeatureElementSupplier(ISymbolicLinkLocalizer symbolicLinkLocalizer)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected IPartialEqualNode
createChildEqualNode(IPartialModelNode parent, AbstractComparedEmfObjects<?> parents, AbstractComparedEmfObjects<?> eObjects, ComparisonContext comparisonContext, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Creates a partial model node for the specified eObjects assumed to be equal for MAIN and OTHER sides.protected IPartialModelNode
createChildNode(IPartialModelNode parent, ComparisonNode comparisonNode, ComparisonContext comparisonContext, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Creates a partial model node for the specified comparison node.protected abstract IPartialEqualNode
createEqualNode(IPartialFeatureNode parent, AbstractComparedEmfObjects<?> parents, AbstractComparedEmfObjects<?> eObjects, ComparisonContext comparisonContext, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Creates a partial model node for the specified eObjects assumed to be equal for MAIN and OTHER sides.protected abstract IPartialModelNode
createNode(IPartialFeatureNode parent, ComparisonNode comparisonNode, ComparisonContext comparisonContext, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Creates a partial model node for the specified comparison node.List<IPartialModelNode>
getInnerElements(IPartialModelNode node, ComparisonContext comparisonContext, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Returns a list of inner elements for the specified partial model node.protected Pair<String,String>
getSingleReferenceRepresentation(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EReference reference, IComparisonDataSource dataSource, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
A utility method for obtaining a representation of a single reference of the specified EObject.protected String
localizeSymlink(String symlink, org.eclipse.emf.ecore.EObject contextObject, org.eclipse.emf.ecore.EStructuralFeature feature, Locale locale)
Localizes given symbolic link.boolean
supports(IPartialModelNode node)
Checks if this provider supports the specified MD object property partial model node.-
Methods inherited from class com._1c.g5.v8.dt.compare.ui.partialmodel.AbstractElementSupplier
createChildEqualNodes, createChildNodes, createEqualNodesObjectsCollector
-
-
-
-
Field Detail
-
symbolicLinkLocalizer
protected final ISymbolicLinkLocalizer symbolicLinkLocalizer
the symbolic link localizer
-
-
Constructor Detail
-
AbstractFeatureElementSupplier
protected AbstractFeatureElementSupplier(ISymbolicLinkLocalizer symbolicLinkLocalizer)
Constructor.- Parameters:
symbolicLinkLocalizer
- the symbolic link localizer, cannot benull
-
-
Method Detail
-
getInnerElements
public List<IPartialModelNode> getInnerElements(IPartialModelNode node, ComparisonContext comparisonContext, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Description copied from interface:IInnerElementSupplier
Returns a list of inner elements for the specified partial model node.- Parameters:
node
- the partial model node, cannot benull
comparisonContext
- the comparison context, cannotnull
scopeProvider
- the scope provider, cannot benull
- Returns:
- a collection of inner elements, never
null
-
supports
public boolean supports(IPartialModelNode node)
Description copied from interface:IInnerElementSupplier
Checks if this provider supports the specified MD object property partial model node.- Parameters:
node
- the partial model node- Returns:
true
if the supplier supports the specified node, andfalse
otherwise
-
createChildEqualNode
protected final IPartialEqualNode createChildEqualNode(IPartialModelNode parent, AbstractComparedEmfObjects<?> parents, AbstractComparedEmfObjects<?> eObjects, ComparisonContext comparisonContext, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Description copied from class:AbstractElementSupplier
Creates a partial model node for the specified eObjects assumed to be equal for MAIN and OTHER sides.- Specified by:
createChildEqualNode
in classAbstractElementSupplier
- Parameters:
parent
- the parent partial model node, notnull
parents
- the parent eObjects, notnull
eObjects
- the objects to create the partial node for, notnull
comparisonContext
- the comparison context, notnull
scopeProvider
- the scope provider, notnull
- Returns:
- a new partial model node, never
null
-
createChildNode
protected final IPartialModelNode createChildNode(IPartialModelNode parent, ComparisonNode comparisonNode, ComparisonContext comparisonContext, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Description copied from class:AbstractElementSupplier
Creates a partial model node for the specified comparison node.- Specified by:
createChildNode
in classAbstractElementSupplier
- Parameters:
parent
- the parent partial model node, notnull
comparisonNode
- the comparison node for which to create the partial one, notnull
comparisonContext
- the comparison context, notnull
scopeProvider
- the scope provider, notnull
- Returns:
- a new partial model node, never
null
-
createEqualNode
protected abstract IPartialEqualNode createEqualNode(IPartialFeatureNode parent, AbstractComparedEmfObjects<?> parents, AbstractComparedEmfObjects<?> eObjects, ComparisonContext comparisonContext, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Creates a partial model node for the specified eObjects assumed to be equal for MAIN and OTHER sides.- Parameters:
parent
- the parent partial model node, notnull
parents
- the parent eObjects, notnull
eObjects
- the objects to create the partial node for, notnull
comparisonContext
- the comparison context, notnull
scopeProvider
- the scope provider, notnull
- Returns:
- a new partial model node, never
null
-
createNode
protected abstract IPartialModelNode createNode(IPartialFeatureNode parent, ComparisonNode comparisonNode, ComparisonContext comparisonContext, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Creates a partial model node for the specified comparison node.- Parameters:
parent
- the parent partial model node, notnull
comparisonNode
- the comparison node for which to create the partial one, notnull
comparisonContext
- the comparison context, notnull
scopeProvider
- the scope provider, notnull
- Returns:
- a new partial model node, never
null
-
getSingleReferenceRepresentation
protected Pair<String,String> getSingleReferenceRepresentation(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EReference reference, IComparisonDataSource dataSource, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
A utility method for obtaining a representation of a single reference of the specified EObject.- Parameters:
object
- the object hosting the referencereference
- the referencedataSource
- the data source for obtaining the underlying symbolic link- Returns:
- a pair of a raw symbolic link and its representation
-
-