org.eclipse.xtext.scoping
Interface IScopeProvider
- All Known Subinterfaces:
- IBatchScopeProvider, IDelegatingScopeProvider
- All Known Implementing Classes:
- AbstractDeclarativeScopeProvider, AbstractGlobalScopeDelegatingScopeProvider, AbstractScopeProvider, CodetemplatesScopeProvider, ImportedNamespaceAwareLocalScopeProvider, SimpleLocalScopeProvider, SingleCodetemplateScopeProvider, SyntheticResourceAwareScopeProvider, XbaseBatchScopeProvider, XbaseImportedNamespaceScopeProvider, XbaseLinkingScopeProvider, XbaseScopeProvider, XbaseWithAnnotationsScopeProvider, XtendImportedNamespaceScopeProvider, XtendScopeProvider, XtextScopeProvider, XtypeScopeProvider, XtypeScopeProvider
public interface IScopeProvider
An IScopeProvider can be used, to get access to a set of visible elements (IEObjectDescription
).
Implementations should inherit from AbstractScopeProvider
.
- Author:
- Heiko Behrens - Initial contribution and API, Sven Efftinge, Sebastian Zarnekow
Method Summary |
IScope |
getScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference)
Returns a scope for the given context. |
getScope
IScope getScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference)
- Returns 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 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.