Class AbstractFeatureScopeSession

    • Constructor Detail

      • AbstractFeatureScopeSession

        public AbstractFeatureScopeSession()
    • Method Detail

      • getScope

        public org.eclipse.xtext.scoping.IScope getScope​(org.eclipse.emf.ecore.EObject context,
                                                         org.eclipse.emf.ecore.EReference reference,
                                                         IResolvedTypes types)
        Description copied from interface: IFeatureScopeSession
        Return the scope for the given context and reference based on the known resolved types.
        Specified by:
        getScope in interface IFeatureScopeSession
        Parameters:
        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.
        See Also:
        IScopeProvider.getScope(EObject, EReference)
      • addTypesToStaticScope

        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)
        Description copied from interface: IFeatureScopeSession
        Add types to the session that are imported statically either as plain static imports or with an extension semantic.
        Specified by:
        addTypesToStaticScope in interface IFeatureScopeSession
        Parameters:
        staticFeatureProviders - the static feature providers. May not be null.
        extensionProviders - the static extension providers. May not be null.
        Returns:
        a configured session.
      • getFeatureScopes

        protected abstract FeatureScopes getFeatureScopes()
      • getTypeScopes

        protected abstract TypeScopes getTypeScopes()
      • getDefaultScopeProvider

        protected abstract org.eclipse.xtext.scoping.IScopeProvider getDefaultScopeProvider()
      • getId

        protected abstract int getId()
        A simple means to identify the session.
      • getEnclosingTypes

        public java.util.List<org.eclipse.xtext.common.types.JvmDeclaredType> getEnclosingTypes()
        Description copied from interface: IFeatureScopeSession
        Returns a list of enclosing types that provide an instance in the current context. The first element in the list is the innermost type.
        Specified by:
        getEnclosingTypes in interface IFeatureScopeSession
      • getNestedTypeDeclarators

        public java.util.List<org.eclipse.xtext.common.types.JvmDeclaredType> getNestedTypeDeclarators()
        Description copied from interface: IFeatureScopeSession
        Returns enclosing types that declare available nested types. The first element in the list is the innermost type.
        Specified by:
        getNestedTypeDeclarators in interface IFeatureScopeSession
      • addLocalElement

        public IFeatureScopeSession addLocalElement​(org.eclipse.xtext.naming.QualifiedName name,
                                                    org.eclipse.xtext.common.types.JvmIdentifiableElement element,
                                                    ITypeReferenceOwner owner)
        Description copied from interface: IFeatureScopeSession
        Add a locally defined identifiable to this scope. It will shadow previously registered locals. No validation of the given name is performed.
        Specified by:
        addLocalElement in interface IFeatureScopeSession
        Parameters:
        name - the qualified name of the identifiable.
        element - the element itself.
        Returns:
        a configured session.
      • addLocalElements

        public IFeatureScopeSession addLocalElements​(java.util.Map<org.eclipse.xtext.naming.QualifiedName,​org.eclipse.xtext.common.types.JvmIdentifiableElement> elements,
                                                     ITypeReferenceOwner owner)
        Description copied from interface: IFeatureScopeSession
        Add locally defined identifiables to this scope. Since the elements have unique names, they cannot shadow each other. However, they will shadow previously added local elements.
        Specified by:
        addLocalElements in interface IFeatureScopeSession
        Parameters:
        elements - the local elements.
        Returns:
        a configured session.
      • tryCreateNestedSessionWithVisibilityContext

        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)
      • createFeatureCallScope

        protected org.eclipse.xtext.scoping.IScope createFeatureCallScope​(org.eclipse.emf.ecore.EObject context,
                                                                          org.eclipse.emf.ecore.EReference reference,
                                                                          IResolvedTypes resolvedTypes)
      • createConstructorScope

        protected org.eclipse.xtext.scoping.IScope createConstructorScope​(org.eclipse.emf.ecore.EObject context,
                                                                          org.eclipse.emf.ecore.EReference reference,
                                                                          IResolvedTypes resolvedTypes)
      • createTypeScope

        protected org.eclipse.xtext.scoping.IScope createTypeScope​(org.eclipse.emf.ecore.EObject context,
                                                                   org.eclipse.emf.ecore.EReference reference,
                                                                   IResolvedTypes resolvedTypes)
      • getLocalElements

        public java.util.List<org.eclipse.xtext.resource.IEObjectDescription> getLocalElements()
        Description copied from interface: IFeatureScopeSession
        Return all local elements that are known in this session.
        Specified by:
        getLocalElements in interface IFeatureScopeSession
        Returns:
        all local elements. Never null.
      • addLocalElements

        protected void addLocalElements​(java.util.List<org.eclipse.xtext.resource.IEObjectDescription> result)
        Parameters:
        result - the list of all local elements. Shadowing semantics do not have to be applied.
      • getStaticallyImportedTypes

        public java.util.List<TypeBucket> getStaticallyImportedTypes()
        Description copied from interface: IFeatureScopeSession
        All statically imported types as type buckets. The list has usually two elements:
        1. The implicitly imported types as a single bucket.
        2. The explicitly imported types as a single bucket.
        Scenarios with more than two buckets are especially nested structures with multiple import sections or ordered imports.
        Specified by:
        getStaticallyImportedTypes in interface IFeatureScopeSession
      • getStaticallyImportedExtensionTypes

        public java.util.List<TypeBucket> getStaticallyImportedExtensionTypes()
        Description copied from interface: IFeatureScopeSession
        All statically imported extension types as type buckets. The list has usually two elements:
        1. The implicitly available extensions as a single bucket.
        2. The explicitly imported extensions as a single bucket.
        Scenarios with more than two buckets are especially nested structures with multiple import sections or ordered imports.
        Specified by:
        getStaticallyImportedExtensionTypes in interface IFeatureScopeSession
      • addExtensionProviders

        protected void addExtensionProviders​(java.util.List<ExpressionBucket> result)
        Parameters:
        result - an aggregating parameter that accepts the extension providers.