org.eclipse.xtext.xbase.scoping.featurecalls
Interface IJvmFeatureScopeProvider

All Known Implementing Classes:
JvmFeatureScopeProvider

public interface IJvmFeatureScopeProvider

Provides a feature scope for a type, based on the type hierarchy. It also allows to add additional secondary elements, it sorts invalid elements out and adds it to the end of the scope hierarchy, and it allows to apply lower prioritized, sugared versions of the JvmFeatureDescriptions contained in the provided Scope.

Author:
Sven Efftinge - Initial contribution and API

Method Summary
 JvmFeatureScope createFeatureScopeForTypeRef(IScope parent, JvmTypeReference typeReference, java.util.List<IJvmFeatureDescriptionProvider> descriptionProvider)
           Provides the feature scope for a given JvmTypeReference, using the given IJvmFeatureDescriptionProvider.
 

Method Detail

createFeatureScopeForTypeRef

JvmFeatureScope createFeatureScopeForTypeRef(IScope parent,
                                             JvmTypeReference typeReference,
                                             java.util.List<IJvmFeatureDescriptionProvider> descriptionProvider)

Provides the feature scope for a given JvmTypeReference, using the given IJvmFeatureDescriptionProvider.

It traverses the type hierarchy of the given JvmTypeReference for each IJvmFeatureDescriptionProvider passed to this method subsequent in the order they are provided. For a sugared scope, you'd typical pass in two IJvmFeatureDescriptionProviders the first one will create the primary features, the second will create sugared elements.

JvmFeatureDescriptions marked as invalid JvmFeatureDescription.isValid(), will be sorted last (even after sugar). This ensures that it is shadowed by valid elements and can be filtered out if not needed.

Parameters:
typeReference - the type whose features should be provided.