public abstract class AbstractFeatureScopeSession extends java.lang.Object implements IFeatureScopeSession
getId().
Requested scopes for other things that features are delegated
to the default scope provider.
The concrete scope computation is performed by a utility.ALL| Constructor and Description |
|---|
AbstractFeatureScopeSession() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addExtensionProviders(java.util.List<ExpressionBucket> result) |
IFeatureScopeSession |
addImports(ITypeImporter.Client importer)
Add types to the session that are either imported statically or as extension.
|
IFeatureScopeSession |
addLocalElement(org.eclipse.xtext.naming.QualifiedName name,
org.eclipse.xtext.common.types.JvmIdentifiableElement element,
ITypeReferenceOwner owner)
Add a locally defined identifiable to this scope.
|
protected void |
addLocalElements(java.util.List<org.eclipse.xtext.resource.IEObjectDescription> result) |
IFeatureScopeSession |
addLocalElements(java.util.Map<org.eclipse.xtext.naming.QualifiedName,org.eclipse.xtext.common.types.JvmIdentifiableElement> elements,
ITypeReferenceOwner owner)
Add locally defined identifiables to this scope.
|
IFeatureScopeSession |
addNestedTypesToScope(org.eclipse.xtext.common.types.JvmDeclaredType type)
Make inherited and declared nested classes of
type available by their simple names. |
IFeatureScopeSession |
addToExtensionScope(java.util.Map<XExpression,LightweightTypeReference> extensionProviders)
Add receivers to the session that contribute extensions.
|
IFeatureScopeSession |
addTypesToStaticScope(java.util.List<? extends org.eclipse.xtext.common.types.JvmType> staticFeatureProviders,
java.util.List<? extends org.eclipse.xtext.common.types.JvmType> extensionProviders)
Add types to the session that are imported statically either as plain static imports
or with an extension semantic.
|
IFeatureScopeSession |
captureLocalElements()
Allows to capture the available local elements as if they have been defined on the
this type as a member. |
protected org.eclipse.xtext.scoping.IScope |
createConstructorScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
IResolvedTypes resolvedTypes) |
protected org.eclipse.xtext.scoping.IScope |
createFeatureCallScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
IResolvedTypes resolvedTypes) |
protected org.eclipse.xtext.scoping.IScope |
createTypeScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
IResolvedTypes resolvedTypes) |
IFeatureScopeSession |
dropLocalElements()
Allows to drop certain local elements from the current scope such as the enclosing
this
for static inner classes. |
protected abstract ConstructorScopes |
getConstructorScopes() |
protected abstract org.eclipse.xtext.scoping.IScopeProvider |
getDefaultScopeProvider() |
java.util.List<org.eclipse.xtext.common.types.JvmDeclaredType> |
getEnclosingTypes()
Returns a list of enclosing types that provide an instance in the current context.
|
java.util.List<ExpressionBucket> |
getExtensionProviders()
All extension providers as expression buckets.
|
protected abstract FeatureScopes |
getFeatureScopes() |
protected abstract int |
getId()
A simple means to identify the session.
|
java.util.List<org.eclipse.xtext.resource.IEObjectDescription> |
getLocalElements()
Return all local elements that are known in this session.
|
java.util.List<org.eclipse.xtext.common.types.JvmDeclaredType> |
getNestedTypeDeclarators()
Returns enclosing types that declare available nested types.
|
IFeatureScopeSession |
getNextCaptureLayer()
Returns the next layer of the captured scopes.
|
protected abstract IResolvedFeatures.Provider |
getResolvedFeaturesProvider() |
org.eclipse.xtext.scoping.IScope |
getScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
IResolvedTypes types)
Return the scope for the given
context and reference based on the
known resolved types. |
java.util.List<TypeBucket> |
getStaticallyImportedExtensionTypes()
All statically imported extension types as type buckets.
|
java.util.List<TypeBucket> |
getStaticallyImportedTypes()
All statically imported types as type buckets.
|
protected abstract TypeScopes |
getTypeScopes() |
IFeatureScopeSession |
toConstructorContext()
Forks this session with a constructor context.
|
IFeatureScopeSession |
toInstanceContext()
Forks this session with an instance context.
|
protected AbstractNestedFeatureScopeSession |
tryCreateNestedSessionWithVisibilityContext(java.util.Map<org.eclipse.xtext.naming.QualifiedName,org.eclipse.xtext.common.types.JvmIdentifiableElement> elements,
ITypeReferenceOwner owner,
org.eclipse.xtext.naming.QualifiedName thisName) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLocalElement, isConstructorContext, isInstanceContext, isVisibleisVisiblepublic org.eclipse.xtext.scoping.IScope getScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
IResolvedTypes types)
IFeatureScopeSessioncontext and reference based on the
known resolved types.getScope in interface IFeatureScopeSessioncontext - the context object. May not be null.reference - the reference that holds the unresolved proxy. May not be null.types - the already computed types.IScopeProvider.getScope(EObject, EReference)public IFeatureScopeSession addTypesToStaticScope(java.util.List<? extends org.eclipse.xtext.common.types.JvmType> staticFeatureProviders, java.util.List<? extends org.eclipse.xtext.common.types.JvmType> extensionProviders)
IFeatureScopeSessionaddTypesToStaticScope in interface IFeatureScopeSessionstaticFeatureProviders - the static feature providers. May not be null.extensionProviders - the static extension providers. May not be null.public IFeatureScopeSession addImports(ITypeImporter.Client importer)
IFeatureScopeSessionaddImports in interface IFeatureScopeSessionimporter - the description of the imported types.protected abstract IResolvedFeatures.Provider getResolvedFeaturesProvider()
protected abstract FeatureScopes getFeatureScopes()
protected abstract ConstructorScopes getConstructorScopes()
protected abstract TypeScopes getTypeScopes()
protected abstract org.eclipse.xtext.scoping.IScopeProvider getDefaultScopeProvider()
protected abstract int getId()
public IFeatureScopeSession addToExtensionScope(java.util.Map<XExpression,LightweightTypeReference> extensionProviders)
IFeatureScopeSessionaddToExtensionScope in interface IFeatureScopeSessionextensionProviders - the expressions that yield extension receivers.public IFeatureScopeSession addNestedTypesToScope(org.eclipse.xtext.common.types.JvmDeclaredType type)
IFeatureScopeSessiontype available by their simple names.addNestedTypesToScope in interface IFeatureScopeSessionpublic java.util.List<org.eclipse.xtext.common.types.JvmDeclaredType> getEnclosingTypes()
IFeatureScopeSessiongetEnclosingTypes in interface IFeatureScopeSessionpublic java.util.List<org.eclipse.xtext.common.types.JvmDeclaredType> getNestedTypeDeclarators()
IFeatureScopeSessiongetNestedTypeDeclarators in interface IFeatureScopeSessionpublic IFeatureScopeSession getNextCaptureLayer()
IFeatureScopeSessiongetNextCaptureLayer in interface IFeatureScopeSessionpublic IFeatureScopeSession toInstanceContext()
IFeatureScopeSessiontoInstanceContext in interface IFeatureScopeSessionIFeatureScopeSession.isInstanceContext()public IFeatureScopeSession toConstructorContext()
IFeatureScopeSessiontoConstructorContext in interface IFeatureScopeSessionIFeatureScopeSession.isInstanceContext()public IFeatureScopeSession dropLocalElements()
IFeatureScopeSessionthis
for static inner classes.dropLocalElements in interface IFeatureScopeSessionpublic IFeatureScopeSession captureLocalElements()
IFeatureScopeSessionthis type as a member.
This will provide a proper scope for non static nested or local classes.captureLocalElements in interface IFeatureScopeSessionpublic IFeatureScopeSession addLocalElement(org.eclipse.xtext.naming.QualifiedName name, org.eclipse.xtext.common.types.JvmIdentifiableElement element, ITypeReferenceOwner owner)
IFeatureScopeSessionaddLocalElement in interface IFeatureScopeSessionname - the qualified name of the identifiable.element - the element itself.public IFeatureScopeSession addLocalElements(java.util.Map<org.eclipse.xtext.naming.QualifiedName,org.eclipse.xtext.common.types.JvmIdentifiableElement> elements, ITypeReferenceOwner owner)
IFeatureScopeSessionaddLocalElements in interface IFeatureScopeSessionelements - the local elements.protected AbstractNestedFeatureScopeSession tryCreateNestedSessionWithVisibilityContext(java.util.Map<org.eclipse.xtext.naming.QualifiedName,org.eclipse.xtext.common.types.JvmIdentifiableElement> elements, ITypeReferenceOwner owner, org.eclipse.xtext.naming.QualifiedName thisName)
protected org.eclipse.xtext.scoping.IScope createFeatureCallScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
IResolvedTypes resolvedTypes)
protected org.eclipse.xtext.scoping.IScope createConstructorScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
IResolvedTypes resolvedTypes)
protected org.eclipse.xtext.scoping.IScope createTypeScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
IResolvedTypes resolvedTypes)
public java.util.List<org.eclipse.xtext.resource.IEObjectDescription> getLocalElements()
IFeatureScopeSessiongetLocalElements in interface IFeatureScopeSessionnull.protected void addLocalElements(java.util.List<org.eclipse.xtext.resource.IEObjectDescription> result)
result - the list of all local elements. Shadowing semantics do not have to be applied.public java.util.List<TypeBucket> getStaticallyImportedTypes()
IFeatureScopeSessiongetStaticallyImportedTypes in interface IFeatureScopeSessionpublic java.util.List<TypeBucket> getStaticallyImportedExtensionTypes()
IFeatureScopeSessiongetStaticallyImportedExtensionTypes in interface IFeatureScopeSessionpublic java.util.List<ExpressionBucket> getExtensionProviders()
IFeatureScopeSessiongetExtensionProviders in interface IFeatureScopeSessionprotected void addExtensionProviders(java.util.List<ExpressionBucket> result)
result - an aggregating parameter that accepts the extension providers.