org.eclipse.xtext.xbase.scoping.batch
Class FeatureScopeProvider
java.lang.Object
org.eclipse.xtext.xbase.scoping.batch.FeatureScopeProvider
- All Implemented Interfaces:
- FeatureNames
public class FeatureScopeProvider
- extends java.lang.Object
- implements FeatureNames
- Author:
- Sebastian Zarnekow - Initial contribution and API
Method Summary |
protected void |
addFeatureDescriptionProviders(JvmDeclaredType contextType,
IFeaturesForTypeProvider featureProvider,
XExpression implicitReceiver,
XExpression implicitArgument,
int priority,
boolean preferStatics,
IAcceptor<IJvmFeatureDescriptionProvider> acceptor)
|
protected void |
addFeatureDescriptionProviders(org.eclipse.emf.ecore.resource.Resource resource,
JvmDeclaredType contextType,
XExpression implicitReceiver,
XExpression implicitArgument,
int priority,
IAcceptor<IJvmFeatureDescriptionProvider> acceptor)
|
protected void |
addFeatureDescriptionProvidersForAssignment(JvmDeclaredType contextType,
IFeaturesForTypeProvider featureProvider,
XExpression implicitReceiver,
XExpression implicitArgument,
int priority,
boolean preferStatics,
IAcceptor<IJvmFeatureDescriptionProvider> acceptor)
|
protected void |
addFeatureDescriptionProvidersForAssignment(org.eclipse.emf.ecore.resource.Resource resource,
JvmDeclaredType contextType,
XExpression implicitReceiver,
XExpression implicitArgument,
int priority,
IAcceptor<IJvmFeatureDescriptionProvider> acceptor)
|
protected void |
addStaticFeatureDescriptionProviders(org.eclipse.emf.ecore.resource.Resource resource,
JvmDeclaredType contextType,
IAcceptor<IJvmFeatureDescriptionProvider> acceptor)
|
protected XAbstractFeatureCall |
asAbstractFeatureCall(org.eclipse.emf.ecore.EObject context)
|
IScope |
createFeatureCallScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes)
creates the feature scope for XAbstractFeatureCall , including the local variables in case it is a feature
call without receiver (XFeatureCall). |
IScope |
createFeatureCallScopeForReceiver(XExpression featureCall,
XExpression receiver,
org.eclipse.emf.ecore.EReference reference,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes)
This method serves as an entry point for the content assist scoping for features. |
protected IScope |
createFeatureScopeForTypeRef(XExpression receiver,
JvmTypeReference featureDeclarator,
org.eclipse.emf.ecore.EObject featureCall,
IFeatureScopeSession session,
IScope parent)
|
protected IScope |
createImplicitFeatureCallScope(org.eclipse.emf.ecore.EObject featureCall,
IScope parent,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes)
|
protected IScope |
createImplicitFeatureCallScope(QualifiedName implicitName,
org.eclipse.emf.ecore.EObject featureCall,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes,
IScope parent)
|
IScope |
createSimpleFeatureCallScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes)
This method serves as an entry point for the content assist scoping for simple feature calls. |
protected StaticExtensionImportsScope |
createStaticExtensionsScope(XExpression receiver,
JvmTypeReference receiverType,
org.eclipse.emf.ecore.EObject featureCall,
IScope parent,
IFeatureScopeSession session)
|
protected IScope |
createStaticFeaturesScope(org.eclipse.emf.ecore.EObject featureCall,
IScope parent,
IFeatureScopeSession session)
|
protected int |
getDefaultPriority()
|
protected int |
getImplicitStaticExtensionPriorityOffset()
|
protected int |
getImplicitStaticFeaturePriority()
|
protected int |
getItPriority()
|
protected int |
getSugarPriorityOffset()
|
protected XExpression |
getSyntacticalReceiver(XAbstractFeatureCall call)
|
protected int |
getThisPriority()
|
boolean |
isFeatureCallScope(org.eclipse.emf.ecore.EReference reference)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_MEMBER_CALL_PRIORITY
protected static final int DEFAULT_MEMBER_CALL_PRIORITY
- See Also:
- Constant Field Values
DEFAULT_IT_PRIORITY
protected static final int DEFAULT_IT_PRIORITY
- See Also:
- Constant Field Values
DEFAULT_THIS_PRIORITY
protected static final int DEFAULT_THIS_PRIORITY
- See Also:
- Constant Field Values
DEFAULT_IMPLICIT_STATIC_FEATURE_PRIORITY
protected static final int DEFAULT_IMPLICIT_STATIC_FEATURE_PRIORITY
- See Also:
- Constant Field Values
DEFAULT_SUGAR_PRIORITY_OFFSET
protected static final int DEFAULT_SUGAR_PRIORITY_OFFSET
- See Also:
- Constant Field Values
DEFAULT_STATIC_EXTENSION_PRIORITY_OFFSET
protected static final int DEFAULT_STATIC_EXTENSION_PRIORITY_OFFSET
- See Also:
- Constant Field Values
FeatureScopeProvider
public FeatureScopeProvider()
createFeatureCallScope
public IScope createFeatureCallScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes)
- creates the feature scope for
XAbstractFeatureCall
, including the local variables in case it is a feature
call without receiver (XFeatureCall).
- Parameters:
session
- the currently available session data
isFeatureCallScope
public boolean isFeatureCallScope(org.eclipse.emf.ecore.EReference reference)
createSimpleFeatureCallScope
public IScope createSimpleFeatureCallScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes)
- This method serves as an entry point for the content assist scoping for simple feature calls.
- Parameters:
context
- the context e.g. a for loop expression, a block or a catch clausereference
- the reference who's value shall be scoped. Not necessarily a feature of the context.
asAbstractFeatureCall
protected XAbstractFeatureCall asAbstractFeatureCall(org.eclipse.emf.ecore.EObject context)
createFeatureScopeForTypeRef
protected IScope createFeatureScopeForTypeRef(XExpression receiver,
JvmTypeReference featureDeclarator,
org.eclipse.emf.ecore.EObject featureCall,
IFeatureScopeSession session,
IScope parent)
createFeatureCallScopeForReceiver
public IScope createFeatureCallScopeForReceiver(XExpression featureCall,
XExpression receiver,
org.eclipse.emf.ecore.EReference reference,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes)
- This method serves as an entry point for the content assist scoping for features.
- Parameters:
featureCall
- the context provides access to the resource set. If it is an assignment, it
will be used to restrict scoping.receiver
- the receiver of the feature call.resolvedTypes
- TODOsession
- TODO
createStaticExtensionsScope
protected StaticExtensionImportsScope createStaticExtensionsScope(XExpression receiver,
JvmTypeReference receiverType,
org.eclipse.emf.ecore.EObject featureCall,
IScope parent,
IFeatureScopeSession session)
getSyntacticalReceiver
protected XExpression getSyntacticalReceiver(XAbstractFeatureCall call)
createStaticFeaturesScope
protected IScope createStaticFeaturesScope(org.eclipse.emf.ecore.EObject featureCall,
IScope parent,
IFeatureScopeSession session)
createImplicitFeatureCallScope
protected IScope createImplicitFeatureCallScope(org.eclipse.emf.ecore.EObject featureCall,
IScope parent,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes)
createImplicitFeatureCallScope
protected IScope createImplicitFeatureCallScope(QualifiedName implicitName,
org.eclipse.emf.ecore.EObject featureCall,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes,
IScope parent)
addStaticFeatureDescriptionProviders
protected void addStaticFeatureDescriptionProviders(org.eclipse.emf.ecore.resource.Resource resource,
JvmDeclaredType contextType,
IAcceptor<IJvmFeatureDescriptionProvider> acceptor)
getThisPriority
protected int getThisPriority()
getDefaultPriority
protected int getDefaultPriority()
getItPriority
protected int getItPriority()
getSugarPriorityOffset
protected int getSugarPriorityOffset()
getImplicitStaticExtensionPriorityOffset
protected int getImplicitStaticExtensionPriorityOffset()
getImplicitStaticFeaturePriority
protected int getImplicitStaticFeaturePriority()
addFeatureDescriptionProviders
protected void addFeatureDescriptionProviders(JvmDeclaredType contextType,
IFeaturesForTypeProvider featureProvider,
XExpression implicitReceiver,
XExpression implicitArgument,
int priority,
boolean preferStatics,
IAcceptor<IJvmFeatureDescriptionProvider> acceptor)
addFeatureDescriptionProviders
protected void addFeatureDescriptionProviders(org.eclipse.emf.ecore.resource.Resource resource,
JvmDeclaredType contextType,
XExpression implicitReceiver,
XExpression implicitArgument,
int priority,
IAcceptor<IJvmFeatureDescriptionProvider> acceptor)
addFeatureDescriptionProvidersForAssignment
protected void addFeatureDescriptionProvidersForAssignment(org.eclipse.emf.ecore.resource.Resource resource,
JvmDeclaredType contextType,
XExpression implicitReceiver,
XExpression implicitArgument,
int priority,
IAcceptor<IJvmFeatureDescriptionProvider> acceptor)
- Parameters:
resource
- the resource which may define implicitly available feature description providers.
addFeatureDescriptionProvidersForAssignment
protected void addFeatureDescriptionProvidersForAssignment(JvmDeclaredType contextType,
IFeaturesForTypeProvider featureProvider,
XExpression implicitReceiver,
XExpression implicitArgument,
int priority,
boolean preferStatics,
IAcceptor<IJvmFeatureDescriptionProvider> acceptor)