org.eclipse.ocl.examples.xtext.base.scoping
Class BaseScopeView

java.lang.Object
  extended by org.eclipse.xtext.scoping.impl.AbstractScope
      extended by org.eclipse.ocl.examples.xtext.base.scoping.BaseScopeView
All Implemented Interfaces:
ScopeView, IScopeView, org.eclipse.xtext.scoping.IScope

public class BaseScopeView
extends org.eclipse.xtext.scoping.impl.AbstractScope
implements IScopeView

ScopeViews support access to some or all of the elements in a scope. Accesses are filtered on the fly since a cache of results does not remain valid for long enough to merit it, with incremental reparsing regularly trashing the CST.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.xtext.scoping.impl.AbstractScope
org.eclipse.xtext.scoping.impl.AbstractScope.ParentIterable
 
Field Summary
protected  Attribution attribution
           
protected  org.eclipse.emf.ecore.EObject child
           
protected  org.eclipse.emf.ecore.EStructuralFeature containmentFeature
           
protected  MetaModelManager metaModelManager
           
static IScopeView NULLSCOPEVIEW
          The NULLSCOPEVIEW to be returned by the most outer scope
protected  org.eclipse.emf.ecore.EObject target
           
protected  org.eclipse.emf.ecore.EReference targetReference
           
 
Fields inherited from interface org.eclipse.xtext.scoping.IScope
NULLSCOPE
 
Constructor Summary
BaseScopeView(MetaModelManager metaModelManager, org.eclipse.emf.ecore.EObject target, Attribution attribution, org.eclipse.emf.ecore.EObject child, org.eclipse.emf.ecore.EStructuralFeature containmentFeature, org.eclipse.emf.ecore.EReference targetReference)
           
 
Method Summary
static void computeLookups(EnvironmentView environmentView, ElementCS parent, org.eclipse.emf.ecore.EObject child, org.eclipse.emf.ecore.EStructuralFeature containmentFeature, org.eclipse.emf.ecore.EReference targetReference)
           
 java.lang.Iterable<org.eclipse.xtext.resource.IEObjectDescription> getAllElements()
           
protected  java.lang.Iterable<org.eclipse.xtext.resource.IEObjectDescription> getAllLocalElements()
           
 Attribution getAttribution()
           
 org.eclipse.emf.ecore.EObject getChild()
           
 org.eclipse.emf.ecore.EStructuralFeature getContainmentFeature()
           
 java.lang.Iterable<org.eclipse.xtext.resource.IEObjectDescription> getElements(org.eclipse.emf.ecore.EObject object)
           
 java.lang.Iterable<org.eclipse.xtext.resource.IEObjectDescription> getElements(org.eclipse.xtext.naming.QualifiedName name)
           
 MetaModelManager getMetaModelManager()
           
 IScopeView getParent()
           
 org.eclipse.xtext.resource.IEObjectDescription getSingleElement(org.eclipse.emf.ecore.EObject object)
           
 org.eclipse.xtext.resource.IEObjectDescription getSingleElement(org.eclipse.xtext.naming.QualifiedName name)
           
 org.eclipse.emf.ecore.EObject getTarget()
           
 org.eclipse.emf.ecore.EReference getTargetReference()
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.xtext.scoping.impl.AbstractScope
getLocalElementsByEObject, getLocalElementsByName, getParentElements, getSingleLocalElementByName, isIgnoreCase, isShadowed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULLSCOPEVIEW

public static final IScopeView NULLSCOPEVIEW
The NULLSCOPEVIEW to be returned by the most outer scope


metaModelManager

protected final MetaModelManager metaModelManager

attribution

protected final Attribution attribution

target

protected final org.eclipse.emf.ecore.EObject target

child

protected final org.eclipse.emf.ecore.EObject child

containmentFeature

protected final org.eclipse.emf.ecore.EStructuralFeature containmentFeature

targetReference

protected final org.eclipse.emf.ecore.EReference targetReference
Constructor Detail

BaseScopeView

public BaseScopeView(MetaModelManager metaModelManager,
                     org.eclipse.emf.ecore.EObject target,
                     Attribution attribution,
                     org.eclipse.emf.ecore.EObject child,
                     org.eclipse.emf.ecore.EStructuralFeature containmentFeature,
                     org.eclipse.emf.ecore.EReference targetReference)
Method Detail

computeLookups

public static void computeLookups(EnvironmentView environmentView,
                                  ElementCS parent,
                                  org.eclipse.emf.ecore.EObject child,
                                  org.eclipse.emf.ecore.EStructuralFeature containmentFeature,
                                  org.eclipse.emf.ecore.EReference targetReference)

getAllElements

public java.lang.Iterable<org.eclipse.xtext.resource.IEObjectDescription> getAllElements()
Specified by:
getAllElements in interface org.eclipse.xtext.scoping.IScope
Overrides:
getAllElements in class org.eclipse.xtext.scoping.impl.AbstractScope

getAllLocalElements

protected final java.lang.Iterable<org.eclipse.xtext.resource.IEObjectDescription> getAllLocalElements()
Specified by:
getAllLocalElements in class org.eclipse.xtext.scoping.impl.AbstractScope

getAttribution

public Attribution getAttribution()
Specified by:
getAttribution in interface ScopeView

getChild

public org.eclipse.emf.ecore.EObject getChild()
Specified by:
getChild in interface ScopeView

getContainmentFeature

public org.eclipse.emf.ecore.EStructuralFeature getContainmentFeature()
Specified by:
getContainmentFeature in interface ScopeView

getElements

public java.lang.Iterable<org.eclipse.xtext.resource.IEObjectDescription> getElements(org.eclipse.xtext.naming.QualifiedName name)
Specified by:
getElements in interface org.eclipse.xtext.scoping.IScope
Overrides:
getElements in class org.eclipse.xtext.scoping.impl.AbstractScope

getElements

public java.lang.Iterable<org.eclipse.xtext.resource.IEObjectDescription> getElements(org.eclipse.emf.ecore.EObject object)
Specified by:
getElements in interface org.eclipse.xtext.scoping.IScope
Overrides:
getElements in class org.eclipse.xtext.scoping.impl.AbstractScope

getMetaModelManager

public MetaModelManager getMetaModelManager()

getParent

public IScopeView getParent()
Specified by:
getParent in interface ScopeView
Specified by:
getParent in interface IScopeView
Overrides:
getParent in class org.eclipse.xtext.scoping.impl.AbstractScope

getSingleElement

public org.eclipse.xtext.resource.IEObjectDescription getSingleElement(org.eclipse.emf.ecore.EObject object)
Specified by:
getSingleElement in interface org.eclipse.xtext.scoping.IScope
Overrides:
getSingleElement in class org.eclipse.xtext.scoping.impl.AbstractScope

getSingleElement

public org.eclipse.xtext.resource.IEObjectDescription getSingleElement(org.eclipse.xtext.naming.QualifiedName name)
Specified by:
getSingleElement in interface org.eclipse.xtext.scoping.IScope
Overrides:
getSingleElement in class org.eclipse.xtext.scoping.impl.AbstractScope

getTarget

public final org.eclipse.emf.ecore.EObject getTarget()
Specified by:
getTarget in interface ScopeView

getTargetReference

public org.eclipse.emf.ecore.EReference getTargetReference()
Specified by:
getTargetReference in interface ScopeView

toString

public java.lang.String toString()
Overrides:
toString in class org.eclipse.xtext.scoping.impl.AbstractScope