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
NULLSCOPEFields inherited from interface com._1c.g5.modeling.xtext.scoping.ISlicedScope
NULLSCOPE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLightSelectableBasedScope(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.IScopecreateScope(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) CreatesIScopefromouterandselectablestatic org.eclipse.xtext.scoping.IScopecreateScope(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 fromunfilteredwith {@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.ISelectableGets correspondingISelectablefor this scopeorg.eclipse.xtext.resource.IEObjectDescriptiongetSingleElement(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 benullselectable- actualISelectablefor constructing scope, can't benullfilter- special filter for scope, iffilter instanceofAndPredicateindex slices will be separated from filter. Can benulltype-EClassof containing elements in the scope, can't benullignoreCase- iftruethe resulting scope ia case-insensitive.slicePredicateService-IIndexSlicePredicateServicefor 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 benullselectable- actualISelectablefor constructing scope, can't benulltype-EClassof containing elements in the scope, can't benullignoreCase- iftruethe resulting scope ia case-insensitive.slicePredicateService-IIndexSlicePredicateServicefor 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) CreatesIScopefromouterandselectable- Parameters:
outer- outerIScope, can't benullselectable- actualISelectablefor constructing scope, can't benullfilter- special filter for scope, iffilter instanceofAndPredicateindex slices will be separated from filter. Can benulltype-EClassof containing elements in the scope, can't benullignoreCase- iftruethe resulting scope ia case-insensitive.slicePredicateService-IIndexSlicePredicateServicefor working with index slices, can't benull
-
getAllElements
- Specified by:
getAllElementsin interfaceorg.eclipse.xtext.scoping.IScope- Overrides:
getAllElementsin classLightAbstractScope
-
getSingleElement
public org.eclipse.xtext.resource.IEObjectDescription getSingleElement(org.eclipse.xtext.naming.QualifiedName name, Collection<ISliceFilter> slices) Description copied from interface:ISlicedScopeFinds the first description that matches the given name.- Specified by:
getSingleElementin 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:ISlicedScopeFind all descriptions that match the given name.- Specified by:
getElementsin 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:ISlicedScopeObtain all elements from the scope. Implementors a free to throw anUnsupportedOperationExceptionif the scope cannot be enumerated.- Specified by:
getAllElementsin 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:ISlicedScopeFinds all descriptions that match the given instance.- Specified by:
getElementsin 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 fromunfilteredwith {@link this#filter}- Parameters:
unfiltered- filtering elements, can't benull- Returns:
- filtered elements, never
null
-
getAllLocalElements
- Specified by:
getAllLocalElementsin 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
nullif filter wasn't set
-
getLocalElementsByName
protected Iterable<org.eclipse.xtext.resource.IEObjectDescription> getLocalElementsByName(org.eclipse.xtext.naming.QualifiedName name) - Overrides:
getLocalElementsByNamein classLightAbstractScope
-
getSelectable
protected org.eclipse.xtext.resource.ISelectable getSelectable()Gets correspondingISelectablefor this scope- Returns:
- corresponding
ISelectablefor this scope, nevernull
-