org.eclipse.xtext.xbase.scoping
Class XtypeScopeProvider
java.lang.Object
org.eclipse.xtext.scoping.impl.AbstractScopeProvider
org.eclipse.xtext.xbase.scoping.XtypeScopeProvider
- All Implemented Interfaces:
- IDelegatingScopeProvider, IScopeProvider
- Direct Known Subclasses:
- XbaseScopeProvider
public class XtypeScopeProvider
- extends AbstractScopeProvider
- implements IDelegatingScopeProvider
TODO: What the purpose of this class, especially of the implementation of #getScope?
- Author:
- Sven Efftinge - Initial contribution and API
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XtypeScopeProvider
public XtypeScopeProvider()
getScope
public IScope getScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference)
- Description copied from interface:
IScopeProvider
- Returns a scope for the given context. The scope provides access to the compatible
visible EObjects for a given reference.
- Specified by:
getScope
in interface IScopeProvider
- 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.
getJvmTypeScope
protected IScope getJvmTypeScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference)
delegateGetScope
protected IScope delegateGetScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference)
setDelegate
public void setDelegate(IScopeProvider delegate)
getDelegate
public IScopeProvider getDelegate()
- Description copied from interface:
IDelegatingScopeProvider
- Provides access to the delegate.
- Specified by:
getDelegate
in interface IDelegatingScopeProvider
- Returns:
- the delegate. May not be
null
.