org.eclipse.ocl.examples.xtext.base.scoping.cs
Class ModelElementCSScopeAdapter<CS extends ModelElementCS,P extends Element>

java.lang.Object
  extended by org.eclipse.ocl.examples.xtext.base.scoping.pivot.AbstractScopeAdapter<CS>
      extended by org.eclipse.ocl.examples.xtext.base.scoping.cs.ElementCSScopeAdapter<CS>
          extended by org.eclipse.ocl.examples.xtext.base.scoping.cs.ModelElementCSScopeAdapter<CS,P>
Type Parameters:
T -
All Implemented Interfaces:
org.eclipse.emf.common.notify.Adapter, org.eclipse.emf.common.notify.Adapter.Internal, TypeManagedAdapter, ScopeAdapter, ScopeCSAdapter
Direct Known Subclasses:
ClassifierContextScopeAdapter, MonikeredElementCSScopeAdapter, OperationContextScopeAdapter, PropertyContextScopeAdapter, TemplateBindingCSScopeAdapter, TemplateParameterSubstitutionCSScopeAdapter, TypedTypeRefCSScopeAdapter, TypeNameExpCSScopeAdapter

public abstract class ModelElementCSScopeAdapter<CS extends ModelElementCS,P extends Element>
extends ElementCSScopeAdapter<CS>

A ModelElementCSScopeAdapter provides the basic behaviour for a family of derived classes that provide additional scope/environment behaviour for corresponding CS elements and pivot element counterparts.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.ocl.examples.xtext.base.scope.ScopeAdapter
ScopeAdapter.Switch
 
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
org.eclipse.emf.common.notify.Adapter.Internal
 
Field Summary
protected  java.lang.Class<CS> csClass
           
protected  java.lang.Class<P> pivotClass
           
 
Fields inherited from class org.eclipse.ocl.examples.xtext.base.scoping.cs.ElementCSScopeAdapter
root, typeManager
 
Fields inherited from class org.eclipse.ocl.examples.xtext.base.scoping.pivot.AbstractScopeAdapter
parent, target
 
Constructor Summary
protected ModelElementCSScopeAdapter(TypeManager typeManager, CS csElement, java.lang.Class<P> pivotClass)
          Creates an instance.
protected ModelElementCSScopeAdapter(TypeManager typeManager, org.eclipse.emf.ecore.EObject csParent, CS csElement, java.lang.Class<P> pivotClass)
           
 
Method Summary
protected  ScopeView getNamespaceScope(EnvironmentView environmentView, ScopeView scopeView, java.util.List<Namespace> namespaces)
          Return the scope in which to resolve an element following a list of namespaces.
protected  ScopeView getNextNamespaceScope(EnvironmentView environmentView, ScopeView scopeView, org.eclipse.emf.common.util.EList<Namespace> namespaces)
          Return the scope in which to resolve a member of a list of namespaces.
 P getPivot()
           
 
Methods inherited from class org.eclipse.ocl.examples.xtext.base.scoping.cs.ElementCSScopeAdapter
getRootScopeAdapter, getTypeManager, isAdapterFor, toString
 
Methods inherited from class org.eclipse.ocl.examples.xtext.base.scoping.pivot.AbstractScopeAdapter
computeLookup, computeLookup, dispose, getDocumentScopeAdapter, getDocumentScopeAdapter, getInnerScopeView, getOuterScopeView, getParent, getScopeAdapter, getScopeCSAdapter, getSourceScope, getTarget, isAdapterForType, notifyChanged, setTarget, unsetTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.xtext.base.scope.ScopeAdapter
computeLookup, computeLookup, getInnerScopeView, getOuterScopeView, getParent, getSourceScope, getTarget
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.utilities.TypeManagedAdapter
dispose
 
Methods inherited from interface org.eclipse.emf.common.notify.Adapter.Internal
unsetTarget
 
Methods inherited from interface org.eclipse.emf.common.notify.Adapter
isAdapterForType, notifyChanged, setTarget
 

Field Detail

csClass

protected final java.lang.Class<CS extends ModelElementCS> csClass

pivotClass

protected final java.lang.Class<P extends Element> pivotClass
Constructor Detail

ModelElementCSScopeAdapter

protected ModelElementCSScopeAdapter(TypeManager typeManager,
                                     CS csElement,
                                     java.lang.Class<P> pivotClass)
Creates an instance.

Parameters:
parent -

ModelElementCSScopeAdapter

protected ModelElementCSScopeAdapter(TypeManager typeManager,
                                     org.eclipse.emf.ecore.EObject csParent,
                                     CS csElement,
                                     java.lang.Class<P> pivotClass)
Method Detail

getPivot

public P getPivot()

getNamespaceScope

protected ScopeView getNamespaceScope(EnvironmentView environmentView,
                                      ScopeView scopeView,
                                      java.util.List<Namespace> namespaces)
Return the scope in which to resolve an element following a list of namespaces.


getNextNamespaceScope

protected ScopeView getNextNamespaceScope(EnvironmentView environmentView,
                                          ScopeView scopeView,
                                          org.eclipse.emf.common.util.EList<Namespace> namespaces)
Return the scope in which to resolve a member of a list of namespaces.

This code assumes that the calling context attempts to resolve namespaces from the outer most, so that the first proxy denotes the next namespace to resolve.