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

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

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

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  org.eclipse.emf.ecore.EObject child
           
protected  org.eclipse.emf.ecore.EStructuralFeature containmentFeature
           
protected  ScopeAdapter scopeAdapter
           
protected  org.eclipse.emf.ecore.EReference targetReference
           
protected  TypeManager typeManager
           
 
Fields inherited from interface org.eclipse.ocl.examples.xtext.base.scope.ScopeView
NULLSCOPEVIEW
 
Fields inherited from interface org.eclipse.xtext.scoping.IScope
NULLSCOPE
 
Constructor Summary
BaseScopeView(TypeManager typeManager, ScopeAdapter scopeAdapter, org.eclipse.emf.ecore.EObject child, org.eclipse.emf.ecore.EStructuralFeature containmentFeature, org.eclipse.emf.ecore.EReference targetReference)
           
BaseScopeView(TypeManager typeManager, ScopeView scopeView)
           
 
Method Summary
 void computeLookupWithParents(EnvironmentView environmentView)
           
 java.lang.Iterable<org.eclipse.xtext.resource.IEObjectDescription> getAllElements()
           
protected  java.lang.Iterable<org.eclipse.xtext.resource.IEObjectDescription> getAllLocalElements()
           
 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)
           
 ScopeView getOuterScope()
          Deprecated. 
 ScopeAdapter getScopeAdapter()
           
 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()
           
 TypeManager getTypeManager()
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.xtext.scoping.impl.AbstractScope
getLocalElementsByEObject, getLocalElementsByName, getParent, getParentElements, getSingleLocalElementByName, isIgnoreCase, isShadowed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

typeManager

protected final TypeManager typeManager

scopeAdapter

protected final ScopeAdapter scopeAdapter

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(TypeManager typeManager,
                     ScopeAdapter scopeAdapter,
                     org.eclipse.emf.ecore.EObject child,
                     org.eclipse.emf.ecore.EStructuralFeature containmentFeature,
                     org.eclipse.emf.ecore.EReference targetReference)

BaseScopeView

public BaseScopeView(TypeManager typeManager,
                     ScopeView scopeView)
Method Detail

computeLookupWithParents

public void computeLookupWithParents(EnvironmentView environmentView)
Specified by:
computeLookupWithParents in interface ScopeView

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

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

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

getOuterScope

@Deprecated
public ScopeView getOuterScope()
Deprecated. 

Specified by:
getOuterScope in interface ScopeView

getScopeAdapter

public ScopeAdapter getScopeAdapter()
Specified by:
getScopeAdapter in interface ScopeView

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

getTypeManager

public TypeManager getTypeManager()

getAllLocalElements

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

toString

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