Class LightSelectableBasedScope
java.lang.Object
com._1c.g5.modeling.xtext.scoping.LightAbstractScope
com._1c.g5.modeling.xtext.scoping.LightSelectableBasedScope
- All Implemented Interfaces:
ISlicedScope
,org.eclipse.xtext.scoping.IScope
- Direct Known Subclasses:
NonShadowedSelectableBasedScope
The lightweight version of the
SelectableBasedScope
.-
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
ConstructorsModifierConstructorDescriptionprotected
LightSelectableBasedScope
(org.eclipse.xtext.scoping.IScope outer, org.eclipse.xtext.resource.ISelectable selectable, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter, org.eclipse.emf.ecore.EClass type, boolean ignoreCase, IIndexSlicePredicateService slicePredicateService) Constructor -
Method Summary
Modifier and TypeMethodDescriptionstatic org.eclipse.xtext.scoping.IScope
createScope
(org.eclipse.xtext.scoping.IScope outer, org.eclipse.xtext.resource.ISelectable selectable, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter, org.eclipse.emf.ecore.EClass type, boolean ignoreCase, IIndexSlicePredicateService slicePredicateService) CreatesIScope
fromouter
andselectable
static org.eclipse.xtext.scoping.IScope
createScope
(org.eclipse.xtext.scoping.IScope outer, org.eclipse.xtext.resource.ISelectable selectable, org.eclipse.emf.ecore.EClass type, boolean ignoreCase, IIndexSlicePredicateService slicePredicateService) Constructorprotected Iterable<org.eclipse.xtext.resource.IEObjectDescription>
filterLocalElements
(Iterable<org.eclipse.xtext.resource.IEObjectDescription> unfiltered) Filters all elements fromunfiltered
with {@link this#filter}Iterable<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, Collection<ISliceFilter> slices) Finds all descriptions that match the given instance.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 com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription>
Gets actual filter scope.protected Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getLocalElementsByName
(org.eclipse.xtext.naming.QualifiedName name) protected org.eclipse.xtext.resource.ISelectable
Gets correspondingISelectable
for this scopeorg.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
getElements, getElements, getLocalElementsByEObject, getParent, getParentElements, getSingleElement, getSingleElement, getSingleLocalElementByName, isIgnoreCase, isShadowed, toString
-
Constructor Details
-
LightSelectableBasedScope
protected LightSelectableBasedScope(org.eclipse.xtext.scoping.IScope outer, org.eclipse.xtext.resource.ISelectable selectable, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter, org.eclipse.emf.ecore.EClass type, boolean ignoreCase, IIndexSlicePredicateService slicePredicateService) Constructor- Parameters:
outer
- outerIScope
, can't benull
selectable
- actualISelectable
for constructing scope, can't benull
filter
- special filter for scope, iffilter instanceof
AndPredicate
index slices will be separated from filter. Can benull
type
-EClass
of containing elements in the scope, can't benull
ignoreCase
- iftrue
the resulting scope ia case-insensitive.slicePredicateService
-IIndexSlicePredicateService
for working with index slices, can't benull
-
-
Method Details
-
createScope
public static org.eclipse.xtext.scoping.IScope createScope(org.eclipse.xtext.scoping.IScope outer, org.eclipse.xtext.resource.ISelectable selectable, org.eclipse.emf.ecore.EClass type, boolean ignoreCase, IIndexSlicePredicateService slicePredicateService) Constructor- Parameters:
outer
- outerIScope
, can't benull
selectable
- actualISelectable
for constructing scope, can't benull
type
-EClass
of containing elements in the scope, can't benull
ignoreCase
- iftrue
the resulting scope ia case-insensitive.slicePredicateService
-IIndexSlicePredicateService
for working with index slices, can't benull
-
createScope
public static org.eclipse.xtext.scoping.IScope createScope(org.eclipse.xtext.scoping.IScope outer, org.eclipse.xtext.resource.ISelectable selectable, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter, org.eclipse.emf.ecore.EClass type, boolean ignoreCase, IIndexSlicePredicateService slicePredicateService) CreatesIScope
fromouter
andselectable
- Parameters:
outer
- outerIScope
, can't benull
selectable
- actualISelectable
for constructing scope, can't benull
filter
- special filter for scope, iffilter instanceof
AndPredicate
index slices will be separated from filter. Can benull
type
-EClass
of containing elements in the scope, can't benull
ignoreCase
- iftrue
the resulting scope ia case-insensitive.slicePredicateService
-IIndexSlicePredicateService
for working with index slices, can't benull
-
getAllElements
- Specified by:
getAllElements
in interfaceorg.eclipse.xtext.scoping.IScope
- Overrides:
getAllElements
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
.
-
filterLocalElements
protected Iterable<org.eclipse.xtext.resource.IEObjectDescription> filterLocalElements(Iterable<org.eclipse.xtext.resource.IEObjectDescription> unfiltered) Filters all elements fromunfiltered
with {@link this#filter}- Parameters:
unfiltered
- filtering elements, can't benull
- Returns:
- filtered elements, never
null
-
getAllLocalElements
- Specified by:
getAllLocalElements
in classLightAbstractScope
-
getFilter
protected com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> getFilter()Gets actual filter scope. There is no index slices in it- Returns:
- actual filter scope. There is no index slices in it. Can be
null
if filter wasn't set
-
getLocalElementsByName
protected Iterable<org.eclipse.xtext.resource.IEObjectDescription> getLocalElementsByName(org.eclipse.xtext.naming.QualifiedName name) - Overrides:
getLocalElementsByName
in classLightAbstractScope
-
getSelectable
protected org.eclipse.xtext.resource.ISelectable getSelectable()Gets correspondingISelectable
for this scope- Returns:
- corresponding
ISelectable
for this scope, nevernull
-