Package org.eclipse.xtext.scoping.impl
Class SimpleLocalScopeProvider
- java.lang.Object
-
- org.eclipse.xtext.scoping.impl.AbstractScopeProvider
-
- org.eclipse.xtext.scoping.impl.AbstractGlobalScopeDelegatingScopeProvider
-
- org.eclipse.xtext.scoping.impl.SimpleLocalScopeProvider
-
- All Implemented Interfaces:
IScopeProvider
public class SimpleLocalScopeProvider extends AbstractGlobalScopeDelegatingScopeProvider
A local scope that uses the qualified names of all elements of anResourceand delegates to a global scope.
-
-
Constructor Summary
Constructors Constructor Description SimpleLocalScopeProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IScopecreateScope(IScope parent, ISelectable resourceContent, org.eclipse.emf.ecore.EClass type, boolean ignoreCase)protected ISelectablegetAllDescriptions(org.eclipse.emf.ecore.resource.Resource resource)protected IQualifiedNameProvidergetNameProvider()IScopegetScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference)Returns a scope for the given context.voidsetCache(org.eclipse.xtext.util.IResourceScopeCache cache)voidsetNameProvider(IQualifiedNameProvider nameProvider)-
Methods inherited from class org.eclipse.xtext.scoping.impl.AbstractGlobalScopeDelegatingScopeProvider
getGlobalScope, getGlobalScope, isIgnoreCase, setWrapper, wrap
-
-
-
-
Method Detail
-
setCache
public void setCache(org.eclipse.xtext.util.IResourceScopeCache cache)
-
setNameProvider
public void setNameProvider(IQualifiedNameProvider nameProvider)
-
getNameProvider
protected IQualifiedNameProvider getNameProvider()
-
getScope
public IScope getScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference)
Description copied from interface:IScopeProviderReturns a scope for the given context. The scope provides access to the compatible visible EObjects for a given reference.- 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 givenEReference.reference- the reference for which to get the scope.- Returns:
IScoperepresenting the innermostIScopefor the passed context and reference. Note for implementors: The result may not benull. ReturnIScope.NULLSCOPEinstead.
-
createScope
protected IScope createScope(IScope parent, ISelectable resourceContent, org.eclipse.emf.ecore.EClass type, boolean ignoreCase)
-
getAllDescriptions
protected ISelectable getAllDescriptions(org.eclipse.emf.ecore.resource.Resource resource)
-
-