@Deprecated public class XbaseScopeProvider extends DelegatingScopeProvider
Modifier and Type | Class and Description |
---|---|
protected class |
XbaseScopeProvider.AbstractJvmFeatureScopeAcceptor
Deprecated.
|
protected class |
XbaseScopeProvider.GenericTypeArgumentContextFactory
Deprecated.
|
static interface |
XbaseScopeProvider.IJvmFeatureScopeAcceptor
Deprecated.
|
protected class |
XbaseScopeProvider.JvmFeatureScopeAcceptor
Deprecated.
|
static interface |
XbaseScopeProvider.LocalVariableAcceptor
Deprecated.
|
protected class |
XbaseScopeProvider.SimpleAcceptor
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_IMPLICIT_STATIC_FEATURE_PRIORITY
Deprecated.
|
protected static int |
DEFAULT_IT_PRIORITY
Deprecated.
|
protected static int |
DEFAULT_MEMBER_CALL_PRIORITY
Deprecated.
|
protected static int |
DEFAULT_STATIC_EXTENSION_PRIORITY_OFFSET
Deprecated.
|
protected static int |
DEFAULT_SUGAR_PRIORITY_OFFSET
Deprecated.
|
protected static int |
DEFAULT_THIS_PRIORITY
Deprecated.
|
static QualifiedName |
IT
Deprecated.
|
protected IJvmFeatureScopeProvider |
jvmFeatureScopeProvider
Deprecated.
|
static QualifiedName |
SUPER
Deprecated.
|
static QualifiedName |
THIS
Deprecated.
|
Constructor and Description |
---|
XbaseScopeProvider()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
adaptsToJvmElement(org.eclipse.emf.ecore.EObject context)
Deprecated.
|
protected void |
addFeatureCallScopes(org.eclipse.emf.ecore.EObject expression,
IScope localVariableScope,
QualifiedName variableName,
int priority,
XbaseScopeProvider.IJvmFeatureScopeAcceptor featureScopeDescriptions)
Deprecated.
|
protected void |
addFeatureCallScopes(org.eclipse.emf.ecore.EObject featureCall,
IScope localVariableScope,
XbaseScopeProvider.IJvmFeatureScopeAcceptor featureScopeDescriptions)
Deprecated.
|
protected void |
addFeatureDescriptionProviders(JvmDeclaredType contextType,
IFeaturesForTypeProvider featureProvider,
XExpression implicitReceiver,
XExpression implicitArgument,
int priority,
boolean preferStatics,
IAcceptor<IJvmFeatureDescriptionProvider> acceptor)
Deprecated.
|
protected void |
addFeatureDescriptionProviders(org.eclipse.emf.ecore.resource.Resource resource,
JvmDeclaredType contextType,
XExpression implicitReceiver,
XExpression implicitArgument,
int priority,
IAcceptor<IJvmFeatureDescriptionProvider> acceptor)
Deprecated.
|
protected void |
addFeatureDescriptionProvidersForAssignment(JvmDeclaredType contextType,
IFeaturesForTypeProvider featureProvider,
XExpression implicitReceiver,
XExpression implicitArgument,
int priority,
boolean preferStatics,
IAcceptor<IJvmFeatureDescriptionProvider> acceptor)
Deprecated.
|
protected void |
addFeatureDescriptionProvidersForAssignment(org.eclipse.emf.ecore.resource.Resource resource,
JvmDeclaredType contextType,
XExpression implicitReceiver,
XExpression implicitArgument,
int priority,
IAcceptor<IJvmFeatureDescriptionProvider> acceptor)
Deprecated.
|
protected void |
addFeatureScopes(JvmTypeReference receiverType,
org.eclipse.emf.ecore.EObject expression,
JvmDeclaredType contextType,
XExpression implicitReceiver,
XExpression implicitArgument,
int priority,
XbaseScopeProvider.IJvmFeatureScopeAcceptor acceptor)
Deprecated.
|
protected void |
addStaticFeatureDescriptionProviders(org.eclipse.emf.ecore.resource.Resource resource,
JvmDeclaredType contextType,
IAcceptor<IJvmFeatureDescriptionProvider> acceptor)
Deprecated.
|
protected IScope |
createConstructorCallScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference)
Deprecated.
|
protected IScope |
createFeatureCallScope(XAbstractFeatureCall call,
org.eclipse.emf.ecore.EReference reference)
Deprecated.
creates the feature scope for
XAbstractFeatureCall , including the local variables in case it is a feature
call without receiver (XFeatureCall). |
IScope |
createFeatureCallScopeForReceiver(XExpression context,
XExpression receiver,
org.eclipse.emf.ecore.EReference reference)
Deprecated.
This method serves as an entry point for the content assist scoping for features.
|
protected IScope |
createFeatureScopeForTypeRef(JvmTypeReference declaringType,
org.eclipse.emf.ecore.EObject expression,
XExpression implicitReceiver,
IScope parent)
Deprecated.
|
protected IScope |
createImplicitFeatureCallScope(org.eclipse.emf.ecore.EObject call,
org.eclipse.emf.ecore.resource.Resource resource,
IScope parent,
IScope localVariableScope)
Deprecated.
override to add any other implicit feature calls.
|
protected void |
createLocalScopeForParameter(JvmFormalParameter p,
XbaseScopeProvider.LocalVariableAcceptor acceptor)
Deprecated.
|
protected IValidatedEObjectDescription |
createLocalVarDescription(JvmFormalParameter p)
Deprecated.
|
protected IValidatedEObjectDescription |
createLocalVarDescription(XVariableDeclaration varDecl)
Deprecated.
|
protected LocalVariableScopeContext |
createLocalVariableScopeContext(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
boolean includeCurrentBlock,
int idx)
Deprecated.
|
protected IScope |
createLocalVarScope(IScope parentScope,
LocalVariableScopeContext scopeContext)
Deprecated.
|
protected void |
createLocalVarScope(XbaseScopeProvider.LocalVariableAcceptor acceptor,
LocalVariableScopeContext scopeContext)
Deprecated.
|
protected void |
createLocalVarScopeForBlock(XBlockExpression block,
int indexOfContextExpressionInBlock,
boolean referredFromClosure,
XbaseScopeProvider.LocalVariableAcceptor acceptor)
Deprecated.
|
protected void |
createLocalVarScopeForCatchClause(XCatchClause catchClause,
int indexOfContextExpressionInBlock,
XbaseScopeProvider.LocalVariableAcceptor acceptor)
Deprecated.
Allows to hook into the local variable definition for catch clauses.
|
protected void |
createLocalVarScopeForClosure(XClosure closure,
XbaseScopeProvider.LocalVariableAcceptor acceptor)
Deprecated.
|
protected void |
createLocalVarScopeForJvmConstructor(JvmConstructor context,
XbaseScopeProvider.LocalVariableAcceptor acceptor)
Deprecated.
|
protected void |
createLocalVarScopeForJvmDeclaredType(JvmDeclaredType type,
XbaseScopeProvider.LocalVariableAcceptor acceptor)
Deprecated.
|
protected void |
createLocalVarScopeForJvmOperation(JvmOperation context,
XbaseScopeProvider.LocalVariableAcceptor acceptor)
Deprecated.
|
protected void |
createLocalVarScopeForSwitchExpression(XSwitchExpression context,
XbaseScopeProvider.LocalVariableAcceptor acceptor)
Deprecated.
|
protected void |
createLocalVarScopeForTypeGuardedCase(XCasePart context,
XbaseScopeProvider.LocalVariableAcceptor acceptor)
Deprecated.
Allows to hook into the case guards to introduce new local variables with a specialized type.
|
IScope |
createSimpleFeatureCallScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
org.eclipse.emf.ecore.resource.Resource resource,
boolean includeCurrentBlock,
int idx)
Deprecated.
This method serves as an entry point for the content assist scoping for simple feature calls.
|
protected JvmDeclaredType |
getContextType(org.eclipse.emf.ecore.EObject obj)
Deprecated.
|
protected int |
getDefaultPriority()
Deprecated.
|
protected FeatureCallToJavaMapping |
getFeatureCallToJavaMapping()
Deprecated.
|
protected int |
getImplicitStaticExtensionPriorityOffset()
Deprecated.
|
protected int |
getImplicitStaticFeaturePriority()
Deprecated.
|
protected int |
getItPriority()
Deprecated.
|
IScope |
getScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference)
Deprecated.
Returns a scope for the given context.
|
protected int |
getSugarPriorityOffset()
Deprecated.
|
protected XExpression |
getSyntacticalReceiver(XAbstractFeatureCall call)
Deprecated.
|
protected int |
getThisPriority()
Deprecated.
|
protected ITypeProvider |
getTypeProvider()
Deprecated.
|
protected boolean |
isConstructorCallScope(org.eclipse.emf.ecore.EReference reference)
Deprecated.
|
boolean |
isFeatureCallScope(org.eclipse.emf.ecore.EReference reference)
Deprecated.
|
protected boolean |
isVisible(JvmFeature feature,
JvmDeclaredType contextType)
Deprecated.
|
protected XConstructorProvider |
newConstructorProvider()
Deprecated.
|
protected DefaultConstructorDescriptionProvider |
newDefaultConstructorDescriptionProvider()
Deprecated.
|
protected DefaultJvmFeatureDescriptionProvider |
newDefaultFeatureDescriptionProvider()
Deprecated.
|
protected StaticImplicitMethodsFeatureForTypeProvider |
newImplicitStaticFeaturesProvider()
Deprecated.
|
protected XFeatureCallSugarDescriptionProvider |
newSugarDescriptionProvider()
Deprecated.
|
void |
setDefaultFeatureDescProvider(com.google.inject.Provider<DefaultJvmFeatureDescriptionProvider> defaultFeatureDescProvider)
Deprecated.
|
void |
setSugarFeatureDescProvider(com.google.inject.Provider<XFeatureCallSugarDescriptionProvider> sugarFeatureDescProvider)
Deprecated.
|
void |
setTypeProvider(ITypeProvider typeProvider)
Deprecated.
|
protected void |
sortDescriptionsFromLowestToHighest(java.util.List<IJvmFeatureScopeProvider.FeatureScopeDescription> list)
Deprecated.
|
protected JvmTypeReference |
unkownToObject(JvmTypeReference receiverType,
org.eclipse.emf.ecore.EObject context)
Deprecated.
|
delegateGetScope, getDelegate, setDelegate
protected static final int DEFAULT_MEMBER_CALL_PRIORITY
protected static final int DEFAULT_IT_PRIORITY
protected static final int DEFAULT_THIS_PRIORITY
protected static final int DEFAULT_IMPLICIT_STATIC_FEATURE_PRIORITY
protected static final int DEFAULT_SUGAR_PRIORITY_OFFSET
protected static final int DEFAULT_STATIC_EXTENSION_PRIORITY_OFFSET
public static final QualifiedName THIS
public static final QualifiedName SUPER
public static final QualifiedName IT
@Inject protected IJvmFeatureScopeProvider jvmFeatureScopeProvider
public void setTypeProvider(ITypeProvider typeProvider)
protected ITypeProvider getTypeProvider()
public void setSugarFeatureDescProvider(com.google.inject.Provider<XFeatureCallSugarDescriptionProvider> sugarFeatureDescProvider)
public void setDefaultFeatureDescProvider(com.google.inject.Provider<DefaultJvmFeatureDescriptionProvider> defaultFeatureDescProvider)
public IScope getScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference)
IScopeProvider
getScope
in interface IScopeProvider
getScope
in class DelegatingScopeProvider
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.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.protected boolean isVisible(JvmFeature feature, JvmDeclaredType contextType)
protected IScope createConstructorCallScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference)
protected boolean isConstructorCallScope(org.eclipse.emf.ecore.EReference reference)
public boolean isFeatureCallScope(org.eclipse.emf.ecore.EReference reference)
protected IScope createFeatureCallScope(XAbstractFeatureCall call, org.eclipse.emf.ecore.EReference reference)
XAbstractFeatureCall
, including the local variables in case it is a feature
call without receiver (XFeatureCall).public IScope createSimpleFeatureCallScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, org.eclipse.emf.ecore.resource.Resource resource, boolean includeCurrentBlock, int idx)
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.includeCurrentBlock
- false
in the context of scoping but content assist will not have the
actual value holder of the reference at hand so it passes its container to this method and expects the
declared variables to be exposed in the scope.idx
- the index in an expression list of a block. Otherwise to be ignored.protected IScope createFeatureScopeForTypeRef(JvmTypeReference declaringType, org.eclipse.emf.ecore.EObject expression, XExpression implicitReceiver, IScope parent)
declaringType
- the type that declares the featureimplicitReceiver
- the instance that will receive the message.expression
- the expression that is closest to the to-be-created scope. Usually the feature call.protected LocalVariableScopeContext createLocalVariableScopeContext(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, boolean includeCurrentBlock, int idx)
public IScope createFeatureCallScopeForReceiver(XExpression context, XExpression receiver, org.eclipse.emf.ecore.EReference reference)
context
- 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.protected XExpression getSyntacticalReceiver(XAbstractFeatureCall call)
protected IScope createImplicitFeatureCallScope(org.eclipse.emf.ecore.EObject call, org.eclipse.emf.ecore.resource.Resource resource, IScope parent, IScope localVariableScope)
protected void addFeatureCallScopes(org.eclipse.emf.ecore.EObject featureCall, IScope localVariableScope, XbaseScopeProvider.IJvmFeatureScopeAcceptor featureScopeDescriptions)
protected void addFeatureCallScopes(org.eclipse.emf.ecore.EObject expression, IScope localVariableScope, QualifiedName variableName, int priority, XbaseScopeProvider.IJvmFeatureScopeAcceptor featureScopeDescriptions)
protected JvmTypeReference unkownToObject(JvmTypeReference receiverType, org.eclipse.emf.ecore.EObject context)
protected JvmDeclaredType getContextType(org.eclipse.emf.ecore.EObject obj)
protected IScope createLocalVarScope(IScope parentScope, LocalVariableScopeContext scopeContext)
protected void createLocalVarScope(XbaseScopeProvider.LocalVariableAcceptor acceptor, LocalVariableScopeContext scopeContext)
protected void createLocalVarScopeForJvmOperation(JvmOperation context, XbaseScopeProvider.LocalVariableAcceptor acceptor)
protected void createLocalVarScopeForJvmConstructor(JvmConstructor context, XbaseScopeProvider.LocalVariableAcceptor acceptor)
protected void createLocalVarScopeForJvmDeclaredType(JvmDeclaredType type, XbaseScopeProvider.LocalVariableAcceptor acceptor)
protected boolean adaptsToJvmElement(org.eclipse.emf.ecore.EObject context)
protected void createLocalVarScopeForSwitchExpression(XSwitchExpression context, XbaseScopeProvider.LocalVariableAcceptor acceptor)
protected void createLocalVarScopeForTypeGuardedCase(XCasePart context, XbaseScopeProvider.LocalVariableAcceptor acceptor)
context
- the case part.acceptor
- the acceptor.protected void createLocalVarScopeForCatchClause(XCatchClause catchClause, int indexOfContextExpressionInBlock, XbaseScopeProvider.LocalVariableAcceptor acceptor)
catchClause
- the catch clause.indexOfContextExpressionInBlock
- the index of the context expression in its surrounding block.acceptor
- the the acceptor.protected void createLocalVarScopeForBlock(XBlockExpression block, int indexOfContextExpressionInBlock, boolean referredFromClosure, XbaseScopeProvider.LocalVariableAcceptor acceptor)
protected void createLocalVarScopeForClosure(XClosure closure, XbaseScopeProvider.LocalVariableAcceptor acceptor)
protected void sortDescriptionsFromLowestToHighest(java.util.List<IJvmFeatureScopeProvider.FeatureScopeDescription> list)
protected void addFeatureScopes(JvmTypeReference receiverType, org.eclipse.emf.ecore.EObject expression, JvmDeclaredType contextType, XExpression implicitReceiver, XExpression implicitArgument, int priority, XbaseScopeProvider.IJvmFeatureScopeAcceptor acceptor)
protected void addStaticFeatureDescriptionProviders(org.eclipse.emf.ecore.resource.Resource resource, JvmDeclaredType contextType, IAcceptor<IJvmFeatureDescriptionProvider> acceptor)
protected int getThisPriority()
protected int getDefaultPriority()
protected int getItPriority()
protected int getSugarPriorityOffset()
protected int getImplicitStaticExtensionPriorityOffset()
protected int getImplicitStaticFeaturePriority()
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 StaticImplicitMethodsFeatureForTypeProvider newImplicitStaticFeaturesProvider()
protected void addFeatureDescriptionProvidersForAssignment(org.eclipse.emf.ecore.resource.Resource resource, JvmDeclaredType contextType, XExpression implicitReceiver, XExpression implicitArgument, int priority, IAcceptor<IJvmFeatureDescriptionProvider> acceptor)
resource
- the resource which may define implicitly available feature description providers.protected void addFeatureDescriptionProvidersForAssignment(JvmDeclaredType contextType, IFeaturesForTypeProvider featureProvider, XExpression implicitReceiver, XExpression implicitArgument, int priority, boolean preferStatics, IAcceptor<IJvmFeatureDescriptionProvider> acceptor)
protected void createLocalScopeForParameter(JvmFormalParameter p, XbaseScopeProvider.LocalVariableAcceptor acceptor)
protected IValidatedEObjectDescription createLocalVarDescription(JvmFormalParameter p)
protected IValidatedEObjectDescription createLocalVarDescription(XVariableDeclaration varDecl)
protected DefaultJvmFeatureDescriptionProvider newDefaultFeatureDescriptionProvider()
protected DefaultConstructorDescriptionProvider newDefaultConstructorDescriptionProvider()
protected XConstructorProvider newConstructorProvider()
protected XFeatureCallSugarDescriptionProvider newSugarDescriptionProvider()
protected FeatureCallToJavaMapping getFeatureCallToJavaMapping()