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, Sebastian Zarnekow

Nested Class Summary
static class IJvmFeatureScopeProvider.FeatureScopeDescription
           
 
Method Summary
 JvmFeatureScope createFeatureScope(IScope parent, java.util.List<IJvmFeatureScopeProvider.FeatureScopeDescription> featureScopeDescriptions)
           Provides the feature scope for a given JvmTypeReference, using the given IJvmFeatureDescriptionProvider.
 

Method Detail

createFeatureScope

JvmFeatureScope createFeatureScope(IScope parent,
                                   java.util.List<IJvmFeatureScopeProvider.FeatureScopeDescription> featureScopeDescriptions)

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:
featureScopeDescriptions - the description of the feature scopes whose contents should be provided.