org.eclipse.ocl.examples.xtext.base.attributes
Class LibraryCSAttribution

java.lang.Object
  extended by org.eclipse.ocl.examples.pivot.scoping.AbstractAttribution
      extended by org.eclipse.ocl.examples.xtext.base.attributes.LibraryCSAttribution
All Implemented Interfaces:
Attribution, CS2Pivot.UnresolvedProxyMessageProvider

public class LibraryCSAttribution
extends AbstractAttribution
implements CS2Pivot.UnresolvedProxyMessageProvider


Field Summary
static LibraryCSAttribution INSTANCE
           
 
Fields inherited from interface org.eclipse.ocl.examples.pivot.scoping.Attribution
REGISTRY
 
Constructor Summary
LibraryCSAttribution()
           
 
Method Summary
 ScopeView computeLookup(org.eclipse.emf.ecore.EObject target, EnvironmentView environmentView, ScopeView scopeView)
          Add the local lookup contributions to a view of an Environment.
 org.eclipse.emf.ecore.EReference getEReference()
           
 java.lang.String getMessage(org.eclipse.emf.ecore.EObject context, java.lang.String linkText)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final LibraryCSAttribution INSTANCE
Constructor Detail

LibraryCSAttribution

public LibraryCSAttribution()
Method Detail

computeLookup

public ScopeView computeLookup(@NonNull
                               org.eclipse.emf.ecore.EObject target,
                               @NonNull
                               EnvironmentView environmentView,
                               @NonNull
                               ScopeView scopeView)
Description copied from interface: Attribution
Add the local lookup contributions to a view of an Environment.

The EnvironmentView contains the lookup matching criteria such as a specific name and accumulates candidate results.

The input ScopeView identifies the CS node and the containment of the CS child from which the lookup is made allowing derived implementations to present the alternative environments specified as the Inherited Attributes in the OCL Specification.

The returned ScopeView identifies an outer scope in which the lookup may be continued if the local candidate results are not suitable.

Specified by:
computeLookup in interface Attribution
Overrides:
computeLookup in class AbstractAttribution
environmentView - the EnvironmentView to compute
scopeView - the access selectivity to be applied by the lookup
Returns:
an outer ScopeView in which to continue the lookup, or null if none

getEReference

@NonNull
public org.eclipse.emf.ecore.EReference getEReference()
Specified by:
getEReference in interface CS2Pivot.UnresolvedProxyMessageProvider

getMessage

@Nullable
public java.lang.String getMessage(@NonNull
                                            org.eclipse.emf.ecore.EObject context,
                                            @NonNull
                                            java.lang.String linkText)
Specified by:
getMessage in interface CS2Pivot.UnresolvedProxyMessageProvider