org.eclipse.ocl.examples.xtext.base.utilities
Class CSI2PivotMapping

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.AdapterImpl
      extended by org.eclipse.ocl.examples.xtext.base.utilities.CSI2PivotMapping
All Implemented Interfaces:
org.eclipse.emf.common.notify.Adapter, org.eclipse.emf.common.notify.Adapter.Internal, MetaModelManagerListener

public class CSI2PivotMapping
extends org.eclipse.emf.common.notify.impl.AdapterImpl
implements MetaModelManagerListener

The CSI2PivotMapping maintains the mapping between CS elements or rather their CSIs that remain stable after recreation and the Pivot elements. This mapping may be used repeatedly while editing (CS2Pivot conversions) to associate changing CS elements with stable Pivot elements. The mapping is also created during a Pivot2CS conversion to allow subsequent CS2Pivot conversions to reuse the original Pivot elements.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
org.eclipse.emf.common.notify.Adapter.Internal
 
Field Summary
 
Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
target
 
Method Summary
 void clear()
           
 java.util.Set<java.lang.String> computeCSIs(java.util.Collection<? extends org.eclipse.emf.ecore.resource.Resource> csResources)
           
 Element get(ModelElementCS csElement)
          Return the Pivot element corresponding to a given CS element.
static CSI2PivotMapping getAdapter(MetaModelManager metaModelManager)
           
 java.util.Map<java.lang.String,Element> getMapping()
           
 boolean isAdapterForType(java.lang.Object type)
           
 void metaModelManagerDisposed(MetaModelManager metaModelManager)
          Respond to disposal of the MetaModelManager by eliminating all further usage.
 void put(ModelElementCS csElement, Element pivotElement)
          Install the Pivot element corresponding to a given CS element.
 void update(java.util.Collection<? extends org.eclipse.emf.ecore.resource.Resource> csResources)
          Update the mapping to cache the Pivot elements with respect to the CSIs for all CS elements in csResources.
 
Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
getTarget, notifyChanged, setTarget, unsetTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAdapter

@NonNull
public static CSI2PivotMapping getAdapter(@NonNull
                                                  MetaModelManager metaModelManager)

clear

public void clear()

computeCSIs

public java.util.Set<java.lang.String> computeCSIs(java.util.Collection<? extends org.eclipse.emf.ecore.resource.Resource> csResources)

get

public Element get(ModelElementCS csElement)
Return the Pivot element corresponding to a given CS element.


getMapping

public java.util.Map<java.lang.String,Element> getMapping()

isAdapterForType

public boolean isAdapterForType(java.lang.Object type)
Specified by:
isAdapterForType in interface org.eclipse.emf.common.notify.Adapter
Overrides:
isAdapterForType in class org.eclipse.emf.common.notify.impl.AdapterImpl

metaModelManagerDisposed

public void metaModelManagerDisposed(@NonNull
                                     MetaModelManager metaModelManager)
Description copied from interface: MetaModelManagerListener
Respond to disposal of the MetaModelManager by eliminating all further usage.

Specified by:
metaModelManagerDisposed in interface MetaModelManagerListener

put

public void put(ModelElementCS csElement,
                Element pivotElement)
Install the Pivot element corresponding to a given CS element.


update

public void update(java.util.Collection<? extends org.eclipse.emf.ecore.resource.Resource> csResources)
Update the mapping to cache the Pivot elements with respect to the CSIs for all CS elements in csResources.