Class LightAbstractScope
- java.lang.Object
-
- com._1c.g5.modeling.xtext.scoping.LightAbstractScope
-
- All Implemented Interfaces:
org.eclipse.xtext.scoping.IScope
- Direct Known Subclasses:
BlockLabelsScope
,BlockVariablesScope
,CompositeScope
,ContextItemsScope
,ImplicitVariablesScope
,ImplicitVariablesScopeByOffset
,LightSelectableBasedScope
,LightSimpleScope
,ModuleMethodsScope
public abstract class LightAbstractScope extends Object implements org.eclipse.xtext.scoping.IScope
Lightweight implementation of the IScope.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LightAbstractScope.EObjectFilterPredicate
Special filter for finding index element corresponding to the concreteEObject
protected static class
LightAbstractScope.ParentIterable
Lazy iterable with a reasonableLightAbstractScope.ParentIterable.toString()
implementation that supports shadowing of parents elements by means of filtering.
-
Constructor Summary
Constructors Modifier Constructor Description protected
LightAbstractScope(org.eclipse.xtext.scoping.IScope parent, boolean ignoreCase)
Creates a new scope with a given parent.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getAllElements()
protected abstract Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getAllLocalElements()
Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getElements(org.eclipse.emf.ecore.EObject object)
Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getElements(org.eclipse.xtext.naming.QualifiedName 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.scoping.IScope
getParent()
protected Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getParentElements(com.google.inject.Provider<Iterable<org.eclipse.xtext.resource.IEObjectDescription>> provider)
org.eclipse.xtext.resource.IEObjectDescription
getSingleElement(org.eclipse.emf.ecore.EObject object)
org.eclipse.xtext.resource.IEObjectDescription
getSingleElement(org.eclipse.xtext.naming.QualifiedName name)
protected org.eclipse.xtext.resource.IEObjectDescription
getSingleLocalElementByName(org.eclipse.xtext.naming.QualifiedName name)
boolean
isIgnoreCase()
protected boolean
isShadowed(org.eclipse.xtext.resource.IEObjectDescription input)
Returnstrue
if the given descriptioninput
from the parent scope is shadowed by local elements.String
toString()
-
-
-
Constructor Detail
-
LightAbstractScope
protected LightAbstractScope(org.eclipse.xtext.scoping.IScope parent, boolean ignoreCase)
Creates a new scope with a given parent.- Parameters:
parent
- the parent scope. May not benull
. UseNULLSCOPE
instead.ignoreCase
- whether name lookup and shadowing should be case insensitive or not.
-
-
Method Detail
-
getAllElements
public Iterable<org.eclipse.xtext.resource.IEObjectDescription> getAllElements()
- Specified by:
getAllElements
in interfaceorg.eclipse.xtext.scoping.IScope
-
getElements
public Iterable<org.eclipse.xtext.resource.IEObjectDescription> getElements(org.eclipse.emf.ecore.EObject object)
- Specified by:
getElements
in interfaceorg.eclipse.xtext.scoping.IScope
-
getElements
public Iterable<org.eclipse.xtext.resource.IEObjectDescription> getElements(org.eclipse.xtext.naming.QualifiedName name)
- Specified by:
getElements
in interfaceorg.eclipse.xtext.scoping.IScope
-
getParent
public org.eclipse.xtext.scoping.IScope getParent()
-
getSingleElement
public org.eclipse.xtext.resource.IEObjectDescription getSingleElement(org.eclipse.emf.ecore.EObject object)
- Specified by:
getSingleElement
in interfaceorg.eclipse.xtext.scoping.IScope
-
getSingleElement
public org.eclipse.xtext.resource.IEObjectDescription getSingleElement(org.eclipse.xtext.naming.QualifiedName name)
- Specified by:
getSingleElement
in interfaceorg.eclipse.xtext.scoping.IScope
-
isIgnoreCase
public boolean isIgnoreCase()
-
getAllLocalElements
protected abstract Iterable<org.eclipse.xtext.resource.IEObjectDescription> getAllLocalElements()
-
getLocalElementsByEObject
protected Iterable<org.eclipse.xtext.resource.IEObjectDescription> getLocalElementsByEObject(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.common.util.URI uri)
-
getLocalElementsByName
protected Iterable<org.eclipse.xtext.resource.IEObjectDescription> getLocalElementsByName(org.eclipse.xtext.naming.QualifiedName name)
-
getParentElements
protected Iterable<org.eclipse.xtext.resource.IEObjectDescription> getParentElements(com.google.inject.Provider<Iterable<org.eclipse.xtext.resource.IEObjectDescription>> provider)
-
getSingleLocalElementByName
protected org.eclipse.xtext.resource.IEObjectDescription getSingleLocalElementByName(org.eclipse.xtext.naming.QualifiedName name)
-
isShadowed
protected boolean isShadowed(org.eclipse.xtext.resource.IEObjectDescription input)
Returnstrue
if the given descriptioninput
from the parent scope is shadowed by local elements.- Returns:
true
if the given descriptioninput
from the parent scope is shadowed by local elements.
-
-