Class CompositeScope
java.lang.Object
com._1c.g5.modeling.xtext.scoping.LightAbstractScope
com._1c.g5.modeling.xtext.scoping.CompositeScope
- All Implemented Interfaces:
ISlicedScope
,org.eclipse.xtext.scoping.IScope
Composes several scopes into one.
-
Nested Class Summary
Nested classes/interfaces inherited from class com._1c.g5.modeling.xtext.scoping.LightAbstractScope
LightAbstractScope.EObjectFilterPredicate, LightAbstractScope.ParentIterable
-
Field Summary
Fields inherited from interface org.eclipse.xtext.scoping.IScope
NULLSCOPE
Fields inherited from interface com._1c.g5.modeling.xtext.scoping.ISlicedScope
NULLSCOPE
-
Constructor Summary
ConstructorsConstructorDescriptionCompositeScope
(org.eclipse.xtext.scoping.IScope parent, boolean ignoreCase) Constructs a composite scope. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addScope
(org.eclipse.xtext.scoping.IScope scope) Adds new scopeIterable<org.eclipse.xtext.resource.IEObjectDescription>
Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getAllElements
(Collection<ISliceFilter> slices) Obtain all elements from the scope.protected Iterable<org.eclipse.xtext.resource.IEObjectDescription>
Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getElements
(org.eclipse.emf.ecore.EObject object) Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getElements
(org.eclipse.emf.ecore.EObject object, Collection<ISliceFilter> slices) Finds all descriptions that match the given instance.Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getElements
(org.eclipse.xtext.naming.QualifiedName name) Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getElements
(org.eclipse.xtext.naming.QualifiedName name, Collection<ISliceFilter> slices) Find all descriptions that match the given name.protected Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getLocalElementsByEObject
(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.common.util.URI uri) protected Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getLocalElementsByName
(org.eclipse.xtext.naming.QualifiedName name) org.eclipse.xtext.resource.IEObjectDescription
getSingleElement
(org.eclipse.xtext.naming.QualifiedName name, Collection<ISliceFilter> slices) Finds the first description that matches the given name.Methods inherited from class com._1c.g5.modeling.xtext.scoping.LightAbstractScope
getParent, getParentElements, getSingleElement, getSingleElement, getSingleLocalElementByName, isIgnoreCase, isShadowed, toString
-
Constructor Details
-
CompositeScope
public CompositeScope(org.eclipse.xtext.scoping.IScope parent, boolean ignoreCase) Constructs a composite scope. The scope is initially empty. Scopes to compose may be added with#getScopes()
.- Parameters:
parent
-ignoreCase
-
-
-
Method Details
-
addScope
public void addScope(org.eclipse.xtext.scoping.IScope scope) Adds new scope- Parameters:
scope
- adding scope, can't benull
-
getElements
public Iterable<org.eclipse.xtext.resource.IEObjectDescription> getElements(org.eclipse.emf.ecore.EObject object) - Specified by:
getElements
in interfaceorg.eclipse.xtext.scoping.IScope
- Overrides:
getElements
in classLightAbstractScope
-
getAllElements
- Specified by:
getAllElements
in interfaceorg.eclipse.xtext.scoping.IScope
- Overrides:
getAllElements
in classLightAbstractScope
-
getElements
public Iterable<org.eclipse.xtext.resource.IEObjectDescription> getElements(org.eclipse.xtext.naming.QualifiedName name) - Specified by:
getElements
in interfaceorg.eclipse.xtext.scoping.IScope
- Overrides:
getElements
in classLightAbstractScope
-
getSingleElement
public org.eclipse.xtext.resource.IEObjectDescription getSingleElement(org.eclipse.xtext.naming.QualifiedName name, Collection<ISliceFilter> slices) Description copied from interface:ISlicedScope
Finds the first description that matches the given name.- Specified by:
getSingleElement
in interfaceISlicedScope
- Parameters:
name
- the name of the to-be-found element. May not benull
.slices
- list of predicates corresponding to the index slices, can't benull
- Returns:
- the first element that matches the
name
. May benull
.
-
getElements
public Iterable<org.eclipse.xtext.resource.IEObjectDescription> getElements(org.eclipse.xtext.naming.QualifiedName name, Collection<ISliceFilter> slices) Description copied from interface:ISlicedScope
Find all descriptions that match the given name.- Specified by:
getElements
in interfaceISlicedScope
- Parameters:
name
- the name of the to-be-found elements. May not benull
.slices
- list of predicates corresponding to the index slices, can't benull
- Returns:
- all elements that match the
name
. Nevernull
.
-
getAllElements
public Iterable<org.eclipse.xtext.resource.IEObjectDescription> getAllElements(Collection<ISliceFilter> slices) Description copied from interface:ISlicedScope
Obtain all elements from the scope. Implementors a free to throw anUnsupportedOperationException
if the scope cannot be enumerated.- Specified by:
getAllElements
in interfaceISlicedScope
- Parameters:
slices
- list of predicates corresponding to the index slices, can't benull
- Returns:
- all elements of the scope. Never
null
.
-
getElements
public Iterable<org.eclipse.xtext.resource.IEObjectDescription> getElements(org.eclipse.emf.ecore.EObject object, Collection<ISliceFilter> slices) Description copied from interface:ISlicedScope
Finds all descriptions that match the given instance.- Specified by:
getElements
in interfaceISlicedScope
- Parameters:
object
- the instance whose descriptions should be obtained. May not benull
.slices
- list of predicates corresponding to the index slices, can't benull
- Returns:
- all elements that match the
instance
. Nevernull
.
-
getLocalElementsByName
protected Iterable<org.eclipse.xtext.resource.IEObjectDescription> getLocalElementsByName(org.eclipse.xtext.naming.QualifiedName name) - Overrides:
getLocalElementsByName
in classLightAbstractScope
-
getLocalElementsByEObject
protected Iterable<org.eclipse.xtext.resource.IEObjectDescription> getLocalElementsByEObject(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.common.util.URI uri) - Overrides:
getLocalElementsByEObject
in classLightAbstractScope
-
getAllLocalElements
- Specified by:
getAllLocalElements
in classLightAbstractScope
-