@NonNullByDefault 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 |
addLocalElement(QualifiedName name,
JvmIdentifiableElement element,
ITypeReferenceOwner owner)
Add a locally defined identifiable to this scope.
|
protected void |
addLocalElements(java.util.List<IEObjectDescription> result) |
IFeatureScopeSession |
addLocalElements(java.util.Map<QualifiedName,JvmIdentifiableElement> elements,
ITypeReferenceOwner owner)
Add locally defined identifiables to this scope.
|
IFeatureScopeSession |
addToExtensionScope(java.util.Map<XExpression,LightweightTypeReference> extensionProviders)
Add receivers to the session that contribute extensions.
|
IFeatureScopeSession |
addTypesToStaticScope(java.util.List<? extends JvmType> staticFeatureProviders,
java.util.List<? extends JvmType> extensionProviders)
Add types to the session that are imported statically either as plain static imports
or with an extension semantic.
|
protected IScope |
createConstructorScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
IResolvedTypes resolvedTypes) |
protected IScope |
createFeatureCallScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
IResolvedTypes resolvedTypes) |
protected IScope |
createTypeScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
IResolvedTypes resolvedTypes) |
protected abstract ConstructorScopes |
getConstructorScopes() |
protected abstract IScopeProvider |
getDefaultScopeProvider() |
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.Collection<IEObjectDescription> |
getLocalElements()
Return all local elements that are known in this session.
|
protected abstract IResolvedFeatures.Provider |
getResolvedFeaturesProvider() |
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 |
toInstanceContext()
Forks this session with an instance context.
|
protected AbstractNestedFeatureScopeSession |
tryCreateNestedSessionWithVisibilityContext(java.util.Map<QualifiedName,JvmIdentifiableElement> elements,
ITypeReferenceOwner owner,
QualifiedName thisName) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLocalElement, isInstanceContext, isVisible
isVisible
public IScope getScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, IResolvedTypes types)
IFeatureScopeSession
context
and reference
based on the
known resolved types
.getScope
in interface IFeatureScopeSession
context
- 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 JvmType> staticFeatureProviders, java.util.List<? extends JvmType> extensionProviders)
IFeatureScopeSession
addTypesToStaticScope
in interface IFeatureScopeSession
staticFeatureProviders
- the static feature providers. May not be null
.extensionProviders
- the static extension providers. May not be null
.protected abstract IResolvedFeatures.Provider getResolvedFeaturesProvider()
protected abstract FeatureScopes getFeatureScopes()
protected abstract ConstructorScopes getConstructorScopes()
protected abstract TypeScopes getTypeScopes()
protected abstract IScopeProvider getDefaultScopeProvider()
protected abstract int getId()
public IFeatureScopeSession addToExtensionScope(java.util.Map<XExpression,LightweightTypeReference> extensionProviders)
IFeatureScopeSession
addToExtensionScope
in interface IFeatureScopeSession
extensionProviders
- the expressions that yield extension receivers.public IFeatureScopeSession toInstanceContext()
IFeatureScopeSession
toInstanceContext
in interface IFeatureScopeSession
IFeatureScopeSession.isInstanceContext()
public IFeatureScopeSession addLocalElement(QualifiedName name, JvmIdentifiableElement element, ITypeReferenceOwner owner)
IFeatureScopeSession
addLocalElement
in interface IFeatureScopeSession
name
- the qualified name of the identifiable.element
- the element itself.public IFeatureScopeSession addLocalElements(java.util.Map<QualifiedName,JvmIdentifiableElement> elements, ITypeReferenceOwner owner)
IFeatureScopeSession
addLocalElements
in interface IFeatureScopeSession
elements
- the local elements.@Nullable protected AbstractNestedFeatureScopeSession tryCreateNestedSessionWithVisibilityContext(java.util.Map<QualifiedName,JvmIdentifiableElement> elements, ITypeReferenceOwner owner, QualifiedName thisName)
protected IScope createFeatureCallScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, IResolvedTypes resolvedTypes)
protected IScope createConstructorScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, IResolvedTypes resolvedTypes)
protected IScope createTypeScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, IResolvedTypes resolvedTypes)
public java.util.Collection<IEObjectDescription> getLocalElements()
IFeatureScopeSession
getLocalElements
in interface IFeatureScopeSession
null
.protected void addLocalElements(java.util.List<IEObjectDescription> result)
result
- the list of all local elements. Shadowing semantics do not have to be applied.public java.util.List<TypeBucket> getStaticallyImportedTypes()
IFeatureScopeSession
getStaticallyImportedTypes
in interface IFeatureScopeSession
public java.util.List<TypeBucket> getStaticallyImportedExtensionTypes()
IFeatureScopeSession
getStaticallyImportedExtensionTypes
in interface IFeatureScopeSession
public java.util.List<ExpressionBucket> getExtensionProviders()
IFeatureScopeSession
getExtensionProviders
in interface IFeatureScopeSession
protected void addExtensionProviders(java.util.List<ExpressionBucket> result)
result
- an aggregating parameter that accepts the extension providers.