public class FeatureScopes extends java.lang.Object implements IFeatureNames
IT, SELF, SUPER, THIS
Constructor and Description |
---|
FeatureScopes() |
Modifier and Type | Method and Description |
---|---|
protected XAbstractFeatureCall |
asAbstractFeatureCall(org.eclipse.emf.ecore.EObject context) |
protected CompositeScope |
createCompositeScope(org.eclipse.emf.ecore.EObject featureCall,
IScope parent,
IFeatureScopeSession session)
Create a composite scope that returns description from multiple other scopes without applying shadowing semantics to then.
|
protected IScope |
createConstructorDelegates(org.eclipse.emf.ecore.EObject context,
IScope parent,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes) |
protected IScope |
createConstructorDelegateScope(org.eclipse.emf.ecore.EObject featureCall,
LightweightTypeReference type,
IScope parent,
IFeatureScopeSession session)
A constructor delegate scope provides the descriptions for
this() and super()
calls in a constructor body. |
protected IScope |
createDynamicExtensionsScope(org.eclipse.emf.ecore.EObject featureCall,
XExpression firstArgument,
LightweightTypeReference firstArgumentType,
boolean implicitArgument,
IScope parent,
IFeatureScopeSession session)
Create a scope that contains dynamic extension features, which are features that are contributed by an instance of a type.
|
protected IScope |
createDynamicExtensionsScope(QualifiedName implicitFirstArgumentName,
org.eclipse.emf.ecore.EObject featureCall,
IFeatureScopeSession captureLayer,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes,
IScope parent,
boolean all) |
protected IScope |
createDynamicExtensionsScope(QualifiedName implicitFirstArgumentName,
IEObjectDescription firstArgumentDescription,
org.eclipse.emf.ecore.EObject featureCall,
IFeatureScopeSession captureLayer,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes,
IScope parent) |
protected IScope |
createDynamicExtensionsScope(XExpression firstArgument,
LightweightTypeReference firstArgumentType,
org.eclipse.emf.ecore.EObject featureCall,
IScope parent,
IFeatureScopeSession captureLayer,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes) |
protected IScope |
createDynamicExtensionsScope(XExpression firstArgument,
LightweightTypeReference firstArgumentType,
org.eclipse.emf.ecore.EObject featureCall,
IScope parent,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes) |
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,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes)
This method serves as an entry point for the content assist scoping for features.
|
protected IScope |
createFeatureScopeForTypeRef(XExpression receiver,
LightweightTypeReference featureDeclarator,
boolean implicit,
org.eclipse.emf.ecore.EObject featureCall,
IFeatureScopeSession session,
JvmIdentifiableElement receiverFeature,
IScope parent,
boolean validStaticScope) |
protected IScope |
createFollowUpErrorScope(LightweightTypeReference receiverType) |
protected IScope |
createImplicitExtensionScope(QualifiedName implicitName,
org.eclipse.emf.ecore.EObject featureCall,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes,
IScope parent) |
protected IScope |
createImplicitFeatureCallAndLocalVariableScope(org.eclipse.emf.ecore.EObject context,
IScope parent,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes) |
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) |
protected IScope |
createImplicitStaticScope(QualifiedName implicitName,
XAbstractFeatureCall featureCall,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes,
IScope parent) |
protected IScope |
createLocalVariableScope(org.eclipse.emf.ecore.EObject featureCall,
IScope parent,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes)
Creates a scope for the local variables that have been registered in the given session.
|
protected IScope |
createNestedTypeLiteralScope(org.eclipse.emf.ecore.EObject featureCall,
LightweightTypeReference enclosingType,
JvmDeclaredType rawEnclosingType,
IScope parent,
IFeatureScopeSession session)
Create a scope that returns nested types.
|
protected IScope |
createReceiverFeatureScope(org.eclipse.emf.ecore.EObject featureCall,
XExpression receiver,
LightweightTypeReference receiverType,
JvmIdentifiableElement receiverFeature,
boolean implicitReceiver,
boolean validStatic,
TypeBucket receiverBucket,
IScope parent,
IFeatureScopeSession session)
Creates a scope that returns the features of a given receiver type.
|
IScope |
createSimpleFeatureCallScope(org.eclipse.emf.ecore.EObject context,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes)
This method serves as an entry point for the content assist scoping for simple feature calls.
|
protected IScope |
createStaticExtensionsScope(org.eclipse.emf.ecore.EObject featureCall,
XExpression firstArgument,
LightweightTypeReference firstArgumentType,
boolean implicitArgument,
IScope parent,
IFeatureScopeSession session)
Create a scope that contains static extension features, which are features that are contributed statically via an import.
|
protected IScope |
createStaticExtensionsScope(XExpression receiver,
LightweightTypeReference receiverType,
org.eclipse.emf.ecore.EObject featureCall,
IScope parent,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes) |
protected IScope |
createStaticFeatureOnTypeLiteralScope(org.eclipse.emf.ecore.EObject featureCall,
XExpression receiver,
LightweightTypeReference receiverType,
TypeBucket receiverBucket,
IScope parent,
IFeatureScopeSession session)
Creates a scope for the static features that are exposed by a type that was used, e.g.
|
protected IScope |
createStaticFeatureOnTypeLiteralScope(XAbstractFeatureCall featureCall,
JvmType type,
XExpression receiver,
LightweightTypeReference receiverType,
IScope parent,
IFeatureScopeSession session) |
protected IScope |
createStaticFeatureScope(XAbstractFeatureCall featureCall,
XExpression receiver,
LightweightTypeReference receiverType,
TypeBucket receiverBucket,
IScope parent,
IFeatureScopeSession session)
Create a scope that contains static features.
|
protected IScope |
createStaticFeaturesScope(org.eclipse.emf.ecore.EObject featureCall,
IScope parent,
IFeatureScopeSession session)
Creates a scope for the statically imported features.
|
protected IScope |
createStaticScope(XAbstractFeatureCall featureCall,
XExpression receiver,
LightweightTypeReference receiverType,
IScope parent,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes) |
protected IScope |
createTypeLiteralScope(org.eclipse.emf.ecore.EObject featureCall,
QualifiedName parentSegments,
IScope parent,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes)
Create a scope that returns types, e.g. for member feature calls that are actually type references like
java.lang.String . |
protected IScope |
createTypeLiteralScope(XExpression featureCall,
XExpression receiver,
IFeatureScopeSession session,
IResolvedTypes resolvedTypes,
LightweightTypeReference receiverType,
JvmIdentifiableElement linkedReceiver) |
protected IEObjectDescription |
getDeepLocalElement(IFeatureScopeSession session,
QualifiedName name) |
protected java.util.List<IEObjectDescription> |
getDeepLocalElements(IFeatureScopeSession session,
QualifiedName name) |
protected OperatorMapping |
getOperatorMapping() |
protected IResolvedFeatures.Provider |
getResolvedFeaturesProvider() |
protected SynonymTypesProvider |
getSynonymProvider() |
protected XExpression |
getSyntacticalReceiver(XAbstractFeatureCall call) |
protected FeatureCallAsTypeLiteralHelper |
getTypeLiteralHelper() |
protected XbaseFactory |
getXbaseFactory() |
protected boolean |
isDefiniteTypeLiteral(XFeatureCall featureCall) |
boolean |
isFeatureCallScope(org.eclipse.emf.ecore.EReference reference) |
protected boolean |
isUnknownReceiverType(LightweightTypeReference receiverType) |
protected boolean |
isValidFeatureCallArgument(XExpression expression,
JvmIdentifiableElement linkedReceiver,
IFeatureScopeSession session)
Returns
true if the linked receiver may be passed as an argument. |
public IScope createFeatureCallScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, IFeatureScopeSession session, IResolvedTypes resolvedTypes)
XAbstractFeatureCall
, including the local variables in case it is a feature
call without receiver (XFeatureCall).session
- the currently available session datapublic boolean isFeatureCallScope(org.eclipse.emf.ecore.EReference reference)
public IScope createSimpleFeatureCallScope(org.eclipse.emf.ecore.EObject context, IFeatureScopeSession session, IResolvedTypes resolvedTypes)
context
- the context e.g. a for loop expression, a block or a catch clauseprotected IScope createImplicitFeatureCallAndLocalVariableScope(org.eclipse.emf.ecore.EObject context, IScope parent, IFeatureScopeSession session, IResolvedTypes resolvedTypes)
protected boolean isDefiniteTypeLiteral(XFeatureCall featureCall)
protected IScope createConstructorDelegates(org.eclipse.emf.ecore.EObject context, IScope parent, IFeatureScopeSession session, IResolvedTypes resolvedTypes)
protected XAbstractFeatureCall asAbstractFeatureCall(org.eclipse.emf.ecore.EObject context)
protected IScope createFeatureScopeForTypeRef(XExpression receiver, LightweightTypeReference featureDeclarator, boolean implicit, org.eclipse.emf.ecore.EObject featureCall, IFeatureScopeSession session, JvmIdentifiableElement receiverFeature, IScope parent, boolean validStaticScope)
public IScope createFeatureCallScopeForReceiver(XExpression featureCall, XExpression receiver, IFeatureScopeSession session, IResolvedTypes resolvedTypes)
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
- TODOprotected IScope createTypeLiteralScope(XExpression featureCall, XExpression receiver, IFeatureScopeSession session, IResolvedTypes resolvedTypes, LightweightTypeReference receiverType, JvmIdentifiableElement linkedReceiver)
protected boolean isUnknownReceiverType(LightweightTypeReference receiverType)
protected boolean isValidFeatureCallArgument(XExpression expression, JvmIdentifiableElement linkedReceiver, IFeatureScopeSession session)
true
if the linked receiver may be passed as an argument. Basically everything could
be passed as an argument except the linked receiver is null, a proxy or a reference to super
.protected IScope createStaticExtensionsScope(XExpression receiver, LightweightTypeReference receiverType, org.eclipse.emf.ecore.EObject featureCall, IScope parent, IFeatureScopeSession session, IResolvedTypes resolvedTypes)
protected IScope createStaticScope(XAbstractFeatureCall featureCall, XExpression receiver, LightweightTypeReference receiverType, IScope parent, IFeatureScopeSession session, IResolvedTypes resolvedTypes)
protected IScope createStaticFeatureOnTypeLiteralScope(XAbstractFeatureCall featureCall, JvmType type, XExpression receiver, LightweightTypeReference receiverType, IScope parent, IFeatureScopeSession session)
protected IScope createDynamicExtensionsScope(XExpression firstArgument, LightweightTypeReference firstArgumentType, org.eclipse.emf.ecore.EObject featureCall, IScope parent, IFeatureScopeSession session, IResolvedTypes resolvedTypes)
protected IScope createDynamicExtensionsScope(XExpression firstArgument, LightweightTypeReference firstArgumentType, org.eclipse.emf.ecore.EObject featureCall, IScope parent, IFeatureScopeSession captureLayer, IFeatureScopeSession session, IResolvedTypes resolvedTypes)
protected IScope createDynamicExtensionsScope(QualifiedName implicitFirstArgumentName, org.eclipse.emf.ecore.EObject featureCall, IFeatureScopeSession captureLayer, IFeatureScopeSession session, IResolvedTypes resolvedTypes, IScope parent, boolean all)
protected IEObjectDescription getDeepLocalElement(IFeatureScopeSession session, QualifiedName name)
protected java.util.List<IEObjectDescription> getDeepLocalElements(IFeatureScopeSession session, QualifiedName name)
protected IScope createDynamicExtensionsScope(QualifiedName implicitFirstArgumentName, IEObjectDescription firstArgumentDescription, org.eclipse.emf.ecore.EObject featureCall, IFeatureScopeSession captureLayer, IFeatureScopeSession session, IResolvedTypes resolvedTypes, IScope parent)
protected XExpression getSyntacticalReceiver(XAbstractFeatureCall call)
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)
protected IScope createImplicitExtensionScope(QualifiedName implicitName, org.eclipse.emf.ecore.EObject featureCall, IFeatureScopeSession session, IResolvedTypes resolvedTypes, IScope parent)
protected IScope createImplicitStaticScope(QualifiedName implicitName, XAbstractFeatureCall featureCall, IFeatureScopeSession session, IResolvedTypes resolvedTypes, IScope parent)
protected IScope createStaticFeatureScope(XAbstractFeatureCall featureCall, XExpression receiver, LightweightTypeReference receiverType, TypeBucket receiverBucket, IScope parent, IFeatureScopeSession session)
receiver
is
null
), or the features may be obtained from a concrete instance.featureCall
- the feature call that is currently processed by the scoping infrastructurereceiver
- an optionally available receiver expressionreceiverType
- the type of the receiver. It may be available even if the receiver itself is null, which indicates an implicit receiver.receiverBucket
- the types that contribute the static features.parent
- the parent scope. Is never null.session
- the currently known scope session. Is never null.protected IScope createStaticFeatureOnTypeLiteralScope(org.eclipse.emf.ecore.EObject featureCall, XExpression receiver, LightweightTypeReference receiverType, TypeBucket receiverBucket, IScope parent, IFeatureScopeSession session)
java.lang.String.valueOf(1)
where valueOf(1)
is to be linked.featureCall
- the feature call that is currently processed by the scoping infrastructurereceiver
- an optionally available receiver expressionreceiverType
- the type of the receiver. It may be available even if the receiver itself is null, which indicates an implicit receiver.receiverBucket
- the types that contribute the static features.parent
- the parent scope. Is never null.session
- the currently known scope session. Is never null.protected IScope createDynamicExtensionsScope(org.eclipse.emf.ecore.EObject featureCall, XExpression firstArgument, LightweightTypeReference firstArgumentType, boolean implicitArgument, IScope parent, IFeatureScopeSession session)
featureCall
- the feature call that is currently processed by the scoping infrastructurefirstArgument
- an optionally available first argument expression.firstArgumentType
- optionally the type of the first argumentimplicitArgument
- if the argument is an implicit argument or explicitly given (in concrete syntax)parent
- the parent scope. Is never null.session
- the currently known scope session. Is never null.protected IScope createStaticExtensionsScope(org.eclipse.emf.ecore.EObject featureCall, XExpression firstArgument, LightweightTypeReference firstArgumentType, boolean implicitArgument, IScope parent, IFeatureScopeSession session)
featureCall
- the feature call that is currently processed by the scoping infrastructurefirstArgument
- an optionally available first argument expression.firstArgumentType
- optionally the type of the first argumentimplicitArgument
- if the argument is an implicit argument or explicitly given (in concrete syntax)parent
- the parent scope. Is never null.session
- the currently known scope session. Is never null.protected IScope createTypeLiteralScope(org.eclipse.emf.ecore.EObject featureCall, QualifiedName parentSegments, IScope parent, IFeatureScopeSession session, IResolvedTypes resolvedTypes)
java.lang.String
.featureCall
- the feature call that is currently processed by the scoping infrastructureparentSegments
- the segments of the fully qualified type name that are already known. The queried element name will be appended to them.parent
- the parent scope. Is never null.session
- the currently known scope session. Is never null.protected IScope createNestedTypeLiteralScope(org.eclipse.emf.ecore.EObject featureCall, LightweightTypeReference enclosingType, JvmDeclaredType rawEnclosingType, IScope parent, IFeatureScopeSession session)
featureCall
- the feature call that is currently processed by the scoping infrastructureenclosingType
- the enclosing type including type parameters for the nested type literal scope.rawEnclosingType
- the raw type that is used to query the nested types.parent
- the parent scope. Is never null.session
- the currently known scope session. Is never null.protected IScope createStaticFeaturesScope(org.eclipse.emf.ecore.EObject featureCall, IScope parent, IFeatureScopeSession session)
featureCall
- the feature call that is currently processed by the scoping infrastructureparent
- the parent scope. Is never null.session
- the currently known scope session. Is never null.protected IScope createLocalVariableScope(org.eclipse.emf.ecore.EObject featureCall, IScope parent, IFeatureScopeSession session, IResolvedTypes resolvedTypes)
featureCall
- the feature call that is currently processed by the scoping infrastructureparent
- the parent scope. Is never null.session
- the currently known scope session. Is never null.resolvedTypes
- may be used by inheritors.protected IScope createConstructorDelegateScope(org.eclipse.emf.ecore.EObject featureCall, LightweightTypeReference type, IScope parent, IFeatureScopeSession session)
this()
and super()
calls in a constructor body.protected CompositeScope createCompositeScope(org.eclipse.emf.ecore.EObject featureCall, IScope parent, IFeatureScopeSession session)
protected IScope createReceiverFeatureScope(org.eclipse.emf.ecore.EObject featureCall, XExpression receiver, LightweightTypeReference receiverType, JvmIdentifiableElement receiverFeature, boolean implicitReceiver, boolean validStatic, TypeBucket receiverBucket, IScope parent, IFeatureScopeSession session)
featureCall
- the feature call that is currently processed by the scoping infrastructurereceiver
- an optionally available receiver expressionreceiverType
- the type of the receiver. It may be available even if the receiver itself is null, which indicates an implicit receiver.receiverFeature
- the feature that was linked as the receiverimplicitReceiver
- true if the receiver is an implicit receivervalidStatic
- true if the receiver is valid according the its static flag, e.g an implicit this in a static method is invalidreceiverBucket
- the types that contribute the static features.parent
- the parent scope. Is never null.session
- the currently known scope session. Is never null.protected IScope createFollowUpErrorScope(LightweightTypeReference receiverType)
protected OperatorMapping getOperatorMapping()
protected IResolvedFeatures.Provider getResolvedFeaturesProvider()
protected SynonymTypesProvider getSynonymProvider()
protected FeatureCallAsTypeLiteralHelper getTypeLiteralHelper()
protected XbaseFactory getXbaseFactory()