org.eclipse.ocl.examples.pivot.scoping
Interface ScopeView

All Known Subinterfaces:
IScopeView
All Known Implementing Classes:
BaseScopeView, PivotScopeView

public interface ScopeView

A ScopeView identifies the context of the current lookup; which is the node in which a lookup is being performed, the child node by which the lookup is requested and the EReference of the location where the result will be used.

Derived PivotScopeViews are created lazily to support lookups over the Pivot AST.

Derived BaseScopeView instances comply with the XText IScope protocol and support lookup over the CST. These must be created eagerly altthough some aspects can be made lazy.

The stateless algorithmic lookup functionality is provided by Attribution instances.


Method Summary
 Attribution getAttribution()
          Return Attribution instance that defines the lookup algorithm for the target node.
 org.eclipse.emf.ecore.EObject getChild()
          Return the immediate child node for which a lookup is requested.
 org.eclipse.emf.ecore.EStructuralFeature getContainmentFeature()
          Return the containment feature of the child within the target.
 ScopeView getParent()
          Return the ScopeView that characterizes a lookup in the parent of the target node.
 ScopeView getRoot()
          Return the ScopeView that characterizes a lookup at the top level.
 org.eclipse.emf.ecore.EObject getTarget()
          Return the target node at which this ScopeView characterizes a lookup.
 boolean isQualified()
          Return true if the lookup is within a qualified name.
 

Method Detail

getAttribution

@NonNull
Attribution getAttribution()
Return Attribution instance that defines the lookup algorithm for the target node.


getChild

@Nullable
org.eclipse.emf.ecore.EObject getChild()
Return the immediate child node for which a lookup is requested.


getContainmentFeature

@Nullable
org.eclipse.emf.ecore.EStructuralFeature getContainmentFeature()
Return the containment feature of the child within the target.


getParent

@NonNull
ScopeView getParent()
Return the ScopeView that characterizes a lookup in the parent of the target node.


getRoot

@NonNull
ScopeView getRoot()
Return the ScopeView that characterizes a lookup at the top level.


getTarget

@Nullable
org.eclipse.emf.ecore.EObject getTarget()
Return the target node at which this ScopeView characterizes a lookup.


isQualified

boolean isQualified()
Return true if the lookup is within a qualified name.