org.eclipse.xtext.xbase.scoping.batch
Class XbaseBatchScopeProvider

java.lang.Object
  extended by org.eclipse.xtext.scoping.impl.AbstractScopeProvider
      extended by org.eclipse.xtext.xbase.scoping.batch.XtypeScopeProvider
          extended by org.eclipse.xtext.xbase.scoping.batch.XbaseBatchScopeProvider
All Implemented Interfaces:
IDelegatingScopeProvider, IScopeProvider, IBatchScopeProvider

public class XbaseBatchScopeProvider
extends XtypeScopeProvider
implements IBatchScopeProvider

Author:
Sebastian Zarnekow - Initial contribution and API

Constructor Summary
XbaseBatchScopeProvider()
           
 
Method Summary
protected  IScope delegateGetScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference)
           
 IScopeProvider getDelegate()
          Provides access to the delegate.
 IScope getScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference)
          Returns a scope for the given context.
protected  boolean isConstructorCallScope(org.eclipse.emf.ecore.EReference reference)
           
 boolean isFeatureCallScope(org.eclipse.emf.ecore.EReference reference)
           
protected  boolean isTypeScope(org.eclipse.emf.ecore.EReference reference)
           
 IFeatureScopeSession newSession(org.eclipse.emf.ecore.resource.Resource context)
          Returns a preconfigured feature scope session that is aware of implicitly imported types such as CollectionLiterals.
 void setDelegate(IScopeProvider delegate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XbaseBatchScopeProvider

public XbaseBatchScopeProvider()
Method Detail

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
Overrides:
getScope in class XtypeScopeProvider
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.

newSession

public IFeatureScopeSession newSession(org.eclipse.emf.ecore.resource.Resource context)
Description copied from interface: IBatchScopeProvider
Returns a preconfigured feature scope session that is aware of implicitly imported types such as CollectionLiterals.

Specified by:
newSession in interface IBatchScopeProvider
Returns:
a new feature scope session. Never null.

delegateGetScope

protected IScope delegateGetScope(org.eclipse.emf.ecore.EObject context,
                                  org.eclipse.emf.ecore.EReference reference)
Overrides:
delegateGetScope in class XtypeScopeProvider

setDelegate

public void setDelegate(IScopeProvider delegate)
Overrides:
setDelegate in class XtypeScopeProvider

getDelegate

public IScopeProvider getDelegate()
Description copied from interface: IDelegatingScopeProvider
Provides access to the delegate.

Specified by:
getDelegate in interface IDelegatingScopeProvider
Overrides:
getDelegate in class XtypeScopeProvider
Returns:
the delegate. May not be null.

isTypeScope

protected boolean isTypeScope(org.eclipse.emf.ecore.EReference reference)

isConstructorCallScope

protected boolean isConstructorCallScope(org.eclipse.emf.ecore.EReference reference)

isFeatureCallScope

public boolean isFeatureCallScope(org.eclipse.emf.ecore.EReference reference)