org.eclipse.xtext.xtend2.scoping
Class Xtend2ScopeProvider

java.lang.Object
  extended by org.eclipse.xtext.scoping.impl.AbstractScopeProvider
      extended by org.eclipse.xtext.xbase.scoping.XtypeScopeProvider
          extended by org.eclipse.xtext.xbase.scoping.XbaseScopeProvider
              extended by org.eclipse.xtext.xbase.annotations.scoping.XbaseWithAnnotationsScopeProvider
                  extended by org.eclipse.xtext.xtend2.scoping.Xtend2ScopeProvider
All Implemented Interfaces:
IScopeProvider

public class Xtend2ScopeProvider
extends XbaseWithAnnotationsScopeProvider

Author:
Sven Efftinge

Field Summary
 
Fields inherited from class org.eclipse.xtext.xbase.scoping.XbaseScopeProvider
jvmFeatureScopeProvider, THIS
 
Constructor Summary
Xtend2ScopeProvider()
           
 
Method Summary
protected  IValidatedEObjectDescription createLocalVarDescription(XtendParameter jvmFormalParameter)
           
protected  IScope createLocalVarScope(IScope parent, LocalVariableScopeContext scopeContext)
           
protected  JvmIdentifiableElement findImplicitReceiverFor(XtendField XtendField)
           
protected  JvmDeclaredType getContextType(org.eclipse.emf.ecore.EObject call)
           
protected  java.lang.Iterable<XtendField> getExtensionDependencies(XtendClass context)
           
protected  java.util.List<IJvmFeatureDescriptionProvider> getFeatureDescriptionProviders(JvmTypeReference type, org.eclipse.emf.ecore.EObject expression, JvmDeclaredType currentContext, XExpression implicitReceiver)
           
 IScope getScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference)
          Returns a scope for the given context.
protected  JvmFeatureScope getScopeForXtendClass(XtendClass context, IScope parent)
           
protected  java.util.List<IJvmFeatureDescriptionProvider> getStaticFeatureDescriptionProviders(org.eclipse.emf.ecore.resource.Resource context, JvmDeclaredType contextType)
           
protected  void insertDescriptionProviders(IFeaturesForTypeProvider staticProvider, JvmDeclaredType currentContext, XExpression implicitReceiver, java.util.List<IJvmFeatureDescriptionProvider> result)
           
 
Methods inherited from class org.eclipse.xtext.xbase.scoping.XbaseScopeProvider
createConstructorCallScope, createFeatureCallScope, createFeatureCallScopeForReceiver, createFeatureScopeForTypeRef, createImplicitFeatureCallScope, createLocalScopeForParameter, createLocalVarDescription, createLocalVarDescription, createLocalVariableScopeContext, createLocalVarScopeForBlock, createLocalVarScopeForCatchClause, createLocalVarScopeForClosure, createLocalVarScopeForSwitchExpression, createLocalVarScopeForTypeGuardedCase, createSimpleFeatureCallScope, createStaticScope, getFeatureDescriptionProvidersForAssignment, getSyntacticalReceiver, getTypeProvider, isConstructorCallScope, isFeatureCallScope, newDefaultFeatureDescProvider, newImplicitStaticFeaturesProvider, newSugarDescriptionProvider, setDefaultFeatureDescProvider, setFeatureNameProvider, setSugarFeatureDescProvider, setTypeProvider
 
Methods inherited from class org.eclipse.xtext.xbase.scoping.XtypeScopeProvider
delegateGetScope, getDelegate, getJvmTypeScope, setDelegate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Xtend2ScopeProvider

public Xtend2ScopeProvider()
Method Detail

getScope

public IScope getScope(org.eclipse.emf.ecore.EObject context,
                       org.eclipse.emf.ecore.EReference reference)
Description copied from interface: IScopeProvider
Returns a scope for the given context. The scope provides access to the compatible visible EObjects for a given reference.

Specified by:
getScope in interface IScopeProvider
Overrides:
getScope in class XbaseWithAnnotationsScopeProvider
Parameters:
context - the element from which an element shall be referenced. It doesn't need to be the element containing the reference, it is just used to find the most inner scope for given EReference.
reference - the reference for which to get the scope.
Returns:
IScope representing the inner most IScope for the passed context and reference. Note for implementors: The result may not be null. Return IScope.NULLSCOPE instead.

createLocalVarScope

protected IScope createLocalVarScope(IScope parent,
                                     LocalVariableScopeContext scopeContext)
Overrides:
createLocalVarScope in class XbaseScopeProvider

getScopeForXtendClass

protected JvmFeatureScope getScopeForXtendClass(XtendClass context,
                                                IScope parent)

getStaticFeatureDescriptionProviders

protected java.util.List<IJvmFeatureDescriptionProvider> getStaticFeatureDescriptionProviders(org.eclipse.emf.ecore.resource.Resource context,
                                                                                              JvmDeclaredType contextType)
Overrides:
getStaticFeatureDescriptionProviders in class XbaseScopeProvider

getFeatureDescriptionProviders

protected java.util.List<IJvmFeatureDescriptionProvider> getFeatureDescriptionProviders(JvmTypeReference type,
                                                                                        org.eclipse.emf.ecore.EObject expression,
                                                                                        JvmDeclaredType currentContext,
                                                                                        XExpression implicitReceiver)
Overrides:
getFeatureDescriptionProviders in class XbaseScopeProvider

findImplicitReceiverFor

protected JvmIdentifiableElement findImplicitReceiverFor(XtendField XtendField)

getExtensionDependencies

protected java.lang.Iterable<XtendField> getExtensionDependencies(XtendClass context)

insertDescriptionProviders

protected void insertDescriptionProviders(IFeaturesForTypeProvider staticProvider,
                                          JvmDeclaredType currentContext,
                                          XExpression implicitReceiver,
                                          java.util.List<IJvmFeatureDescriptionProvider> result)

createLocalVarDescription

protected IValidatedEObjectDescription createLocalVarDescription(XtendParameter jvmFormalParameter)

getContextType

protected JvmDeclaredType getContextType(org.eclipse.emf.ecore.EObject call)
Overrides:
getContextType in class XbaseScopeProvider