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

java.lang.Object
  extended by org.eclipse.xtext.scoping.impl.AbstractScope
      extended by org.eclipse.xtext.xbase.scoping.batch.AbstractSessionBasedScope
All Implemented Interfaces:
IScope
Direct Known Subclasses:
AbstractStaticImportsScope, LocalVariableScope, ReceiverFeatureScope

public abstract class AbstractSessionBasedScope
extends AbstractScope

Author:
Sebastian Zarnekow - Initial contribution and API

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.xtext.scoping.impl.AbstractScope
AbstractScope.ParentIterable
 
Field Summary
 
Fields inherited from interface org.eclipse.xtext.scoping.IScope
NULLSCOPE
 
Constructor Summary
protected AbstractSessionBasedScope(IScope parent, IFeatureScopeSession session, XAbstractFeatureCall featureCall)
           
 
Method Summary
 java.lang.Iterable<IEObjectDescription> getElements(QualifiedName name)
          Find all descriptions that match the given name.
protected  XAbstractFeatureCall getFeatureCall()
           
protected  java.lang.String getFeatureName(QualifiedName name)
           
protected  java.lang.Iterable<IEObjectDescription> getLocalElementsByEObject(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.common.util.URI uri)
           
protected abstract  java.util.Collection<IEObjectDescription> getLocalElementsByName(QualifiedName name)
           
protected  IFeatureScopeSession getSession()
           
protected  java.lang.String getShadowingKey(IEObjectDescription description)
           
protected  boolean isShadowed(IEObjectDescription fromParent)
          Returns true if the given description input from the parent scope is shadowed by local elements.
 
Methods inherited from class org.eclipse.xtext.scoping.impl.AbstractScope
getAllElements, getAllLocalElements, getElements, getParent, getParentElements, getSingleElement, getSingleElement, getSingleLocalElementByName, isIgnoreCase, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractSessionBasedScope

protected AbstractSessionBasedScope(IScope parent,
                                    IFeatureScopeSession session,
                                    XAbstractFeatureCall featureCall)
Method Detail

getSession

protected IFeatureScopeSession getSession()

getFeatureCall

protected XAbstractFeatureCall getFeatureCall()

getFeatureName

protected java.lang.String getFeatureName(QualifiedName name)

getLocalElementsByName

protected abstract java.util.Collection<IEObjectDescription> getLocalElementsByName(QualifiedName name)
Overrides:
getLocalElementsByName in class AbstractScope

getElements

public java.lang.Iterable<IEObjectDescription> getElements(QualifiedName name)
Description copied from interface: IScope
Find all descriptions that match the given name.

Specified by:
getElements in interface IScope
Overrides:
getElements in class AbstractScope
Parameters:
name - the name of the to-be-found elements. May not be null.
Returns:
all elements that match the name. Never null.

getLocalElementsByEObject

protected java.lang.Iterable<IEObjectDescription> getLocalElementsByEObject(org.eclipse.emf.ecore.EObject object,
                                                                            org.eclipse.emf.common.util.URI uri)
Overrides:
getLocalElementsByEObject in class AbstractScope

getShadowingKey

protected java.lang.String getShadowingKey(IEObjectDescription description)

isShadowed

protected boolean isShadowed(IEObjectDescription fromParent)
Description copied from class: AbstractScope
Returns true if the given description input from the parent scope is shadowed by local elements.

Overrides:
isShadowed in class AbstractScope
Returns:
true if the given description input from the parent scope is shadowed by local elements.