|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.common.notify.impl.AdapterImpl
org.eclipse.ocl.examples.xtext.base.utilities.CSI2PivotMapping
public class CSI2PivotMapping
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 | |
---|---|
protected java.util.Map<BaseCSResource,ASResource> |
cs2asResourceMap
Mapping of each CS resource to its corresponding pivot Resource. |
Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl |
---|
target |
Method Summary | |
---|---|
void |
add(java.util.Map<? extends BaseCSResource,? extends ASResource> cs2asResourceMap)
|
void |
clear()
|
java.util.Set<java.lang.String> |
computeCSIs(java.util.Collection<? extends org.eclipse.emf.ecore.resource.Resource> csResources)
|
protected java.util.Map<Element,ModelElementCS> |
computePivot2CSMap()
|
Element |
get(ModelElementCS csElement)
Return the Pivot element corresponding to a given CS element. |
static CSI2PivotMapping |
getAdapter(MetaModelManager metaModelManager)
|
ASResource |
getASResource(BaseCSResource csResource)
Return the AS Resource corresponding to a given CS Resource. |
ModelElementCS |
getCSElement(Element pivotElement)
|
java.util.Set<BaseCSResource> |
getCSResources()
Return all mapped CS Resources. |
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 |
removeCSResources(java.util.Set<? extends BaseCSResource> csResources)
Remove the Resource mappings for all csResources. |
void |
update()
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 |
Field Detail |
---|
@NonNull protected final java.util.Map<BaseCSResource,ASResource> cs2asResourceMap
Method Detail |
---|
@NonNull public static CSI2PivotMapping getAdapter(@NonNull MetaModelManager metaModelManager)
public void add(java.util.Map<? extends BaseCSResource,? extends ASResource> cs2asResourceMap)
public void clear()
public java.util.Set<java.lang.String> computeCSIs(java.util.Collection<? extends org.eclipse.emf.ecore.resource.Resource> csResources)
@NonNull protected java.util.Map<Element,ModelElementCS> computePivot2CSMap()
@Nullable public Element get(@NonNull ModelElementCS csElement)
@Nullable public ASResource getASResource(@Nullable BaseCSResource csResource)
@NonNull public java.util.Set<BaseCSResource> getCSResources()
@Nullable public ModelElementCS getCSElement(@NonNull Element pivotElement)
public java.util.Map<java.lang.String,Element> getMapping()
public boolean isAdapterForType(java.lang.Object type)
isAdapterForType
in interface org.eclipse.emf.common.notify.Adapter
isAdapterForType
in class org.eclipse.emf.common.notify.impl.AdapterImpl
public void metaModelManagerDisposed(@NonNull MetaModelManager metaModelManager)
MetaModelManagerListener
metaModelManagerDisposed
in interface MetaModelManagerListener
public void put(@NonNull ModelElementCS csElement, @Nullable Element pivotElement)
public void removeCSResources(@NonNull java.util.Set<? extends BaseCSResource> csResources)
public void update()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |