|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.ecore.util.EcoreUtil org.eclipse.ocl.examples.pivot.utilities.AbstractConversion org.eclipse.ocl.examples.xtext.base.cs2pivot.CS2Pivot org.eclipse.ocl.examples.xtext.base.cs2pivot.BaseCS2Pivot
public class BaseCS2Pivot
BaseCST2Pivot provides an extensible conversion from CS models to the pivot model.
Conversion/update occurs in five passes.
Pass 1: updateDeclarers()
the package/class/property/template parameter CS composition hierarchy is replicated in the pivot hierarchy
requests for unreferable declarations are accumulated in queuedDefiners.
requests for specialization are accumulated in queuedBindings.
requests for references are accumulated in queuedReferencers.
all unspecialized pivot elements have correct attributes and composed children
all unspecialized pivot nameable elements appear in moniker2pivotMap.
Pass 2: updateDefiners()
the feature/annotation/detail CS composition hierarchy is replicated in the pivot hierarchy
requests for specialization are accumulated in queuedBindings.
requests for references are accumulated in queuedReferencers.
all unspecialized pivot elements have correct attributes and composed children
all unspecialized pivot nameable elements appear in moniker2pivotMap.
Pass 3: updateReferencers()
the expression CS composition hierarchy is replicated in the pivot hierarchy
requests for resolvers are accumulated in queuedResolvers.
Pass 4: updateSpecializations()
a unique pivot specialization is created/updated from each distinct CS specialization.
further requests for references are accumulated in queuedReferencers.
all pivot elements have correct attributes and composed children
all pivot nameable elements appear in moniker2pivotMap.
all specialized elements have correct signature, formal references
Pass 5: updateResolvers()
cross-tree references are resolved in the pivot model.
- pivot specialization actual arguments
- TypedElementCS.type, TypedTypeRefCS.type, ...
Correlation between the CS and pivot is achieved by monikers which are unique for all NameableElements. The old pivot model's monikers initialize the moniker2PivotMap so the the subsequent refresh can discover a pre-existing pivot element for each required CS element. The moniker2PivotMap is updated as pivot elements are created. pivot monikers are not used during conversion since it may not be possible to create the correct moniker for a partially converted specialization.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.ocl.examples.xtext.base.cs2pivot.CS2Pivot |
---|
CS2Pivot.UnresolvedProxyMessageProvider |
Nested classes/interfaces inherited from class org.eclipse.ocl.examples.pivot.utilities.AbstractConversion |
---|
AbstractConversion.Predicate<T extends org.eclipse.emf.ecore.EObject> |
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.util.EcoreUtil |
---|
org.eclipse.emf.ecore.util.EcoreUtil.AbstractFilteredSettingsIterator<E>, org.eclipse.emf.ecore.util.EcoreUtil.ContentTreeIterator<E>, org.eclipse.emf.ecore.util.EcoreUtil.Copier, org.eclipse.emf.ecore.util.EcoreUtil.CrossReferencer, org.eclipse.emf.ecore.util.EcoreUtil.EGenericTypeConverter, org.eclipse.emf.ecore.util.EcoreUtil.EqualityHelper, org.eclipse.emf.ecore.util.EcoreUtil.ExternalCrossReferencer, org.eclipse.emf.ecore.util.EcoreUtil.FilteredSettingsIterator, org.eclipse.emf.ecore.util.EcoreUtil.ProperContentIterator<E>, org.eclipse.emf.ecore.util.EcoreUtil.ProxyCrossReferencer, org.eclipse.emf.ecore.util.EcoreUtil.UnresolvedProxyCrossReferencer, org.eclipse.emf.ecore.util.EcoreUtil.UsageCrossReferencer |
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter |
---|
org.eclipse.emf.common.notify.Adapter.Internal |
Field Summary | |
---|---|
static CS2Pivot.Factory |
FACTORY
|
Fields inherited from class org.eclipse.ocl.examples.xtext.base.cs2pivot.CS2Pivot |
---|
cs2pivotResourceMap, moniker2PivotCSMap, typeManager |
Fields inherited from class org.eclipse.emf.ecore.util.EcoreUtil |
---|
GEN_MODEL_PACKAGE_NS_URI, GET, IS_SET, SET, UNSET |
Constructor Summary | |
---|---|
BaseCS2Pivot(java.util.Map<? extends org.eclipse.emf.ecore.resource.Resource,? extends org.eclipse.emf.ecore.resource.Resource> cs2pivotResourceMap,
TypeManager typeManager)
|
Method Summary |
---|
Methods inherited from class org.eclipse.ocl.examples.xtext.base.cs2pivot.CS2Pivot |
---|
addFactory, addUnresolvedProxyMessageProvider, computeMoniker2CSMap, computeMoniker2CSMap, findAdapter, getCSResources, getDocumentationNodes, getFactory, getPivotResource, getPivotResources, getScopeVisitor, getTarget, getTypeManager, getUnresolvedProxyMessage, getUnresolvedProxyText, isAdapterForType, notifyChanged, resetCSMonikers, resetPivotMonikers, setTarget, update |
Methods inherited from class org.eclipse.ocl.examples.pivot.utilities.AbstractConversion |
---|
basicGet, getEPackage, isId, refreshList, refreshSet |
Methods inherited from class org.eclipse.emf.ecore.util.EcoreUtil |
---|
computeDiagnostic, convertToString, copy, copyAll, create, createFromString, delete, delete, equals, filterDescendants, freeze, generateUUID, generateUUID, getAdapter, getAdapterFactory, getAllContents, getAllContents, getAllContents, getAllContents, getAllContents, getAllProperContents, getAllProperContents, getAllProperContents, getAllProperContents, getAnnotation, getConstraints, getDocumentation, getExistingAdapter, getID, getIdentification, getInvocationDelegateFactory, getInvocationDelegates, getObjectByType, getObjectsByType, getRegisteredAdapter, getRegisteredAdapter, getRootContainer, getRootContainer, getSettingDelegateFactory, getSettingDelegates, getURI, getValidationDelegates, indexOf, isAncestor, isAncestor, isAncestor, isAncestor, isInvariant, isSuppressedVisibility, isSuppressedVisibility, remove, remove, remove, replace, replace, replace, resolve, resolve, resolve, resolveAll, resolveAll, resolveAll, setAnnotation, setConstraints, setDocumentation, setEList, setEList, setID, setInvocationDelegates, setSettingDelegates, setSuppressedVisibility, setSuppressedVisibility, setValidationDelegates, toJavaInstanceTypeName, wrapperClassFor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static CS2Pivot.Factory FACTORY
Constructor Detail |
---|
public BaseCS2Pivot(java.util.Map<? extends org.eclipse.emf.ecore.resource.Resource,? extends org.eclipse.emf.ecore.resource.Resource> cs2pivotResourceMap, TypeManager typeManager)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |