public abstract class CS2AS extends AbstractConversion
Modifier and Type | Class and Description |
---|---|
static class |
CS2AS.AbstractUnresolvedProxyMessageProvider |
static class |
CS2AS.DefaultMessageBinder
Default message binder that just invokes
NLS.bind(String, Object[]) . |
static interface |
CS2AS.MessageBinder
Interface for an optional message binder that may be used to affix additional context
for standalone and command line applications.
|
static class |
CS2AS.MessageBinderWithLineContext
Message binder that prefixes the uri and line number to the return from
NLS.bind(String, Object[]) . |
static interface |
CS2AS.UnresolvedProxyMessageProvider |
AbstractConversion.Predicate<T extends org.eclipse.emf.ecore.EObject>
Modifier and Type | Field and Description |
---|---|
protected ASResource |
asResource
The AS resource mapped by this CS2AS.
|
protected CSI2ASMapping |
csi2asMapping
CS to Pivot mapping controller for aliases and CSIs.
|
protected BaseCSResource |
csResource
The CS resource mapped by this CS2AS.
|
static boolean |
showContext
Whether to show file and line number context at the start of messages.
|
completeEnvironment, environmentFactory, metamodelManager, standardLibrary
Modifier | Constructor and Description |
---|---|
protected |
CS2AS(CS2AS aConverter) |
|
CS2AS(EnvironmentFactoryInternal environmentFactory,
BaseCSResource csResource,
ASResource asResource) |
Modifier and Type | Method and Description |
---|---|
static void |
addUnresolvedProxyMessageProvider(CS2AS.UnresolvedProxyMessageProvider unresolvedProxyMessageProvider) |
static Element |
basicGetType(TypedTypeRefCS csTypedRef) |
java.lang.String |
bind(org.eclipse.emf.ecore.EObject csContext,
java.lang.String messageTemplate,
java.lang.Object... bindings) |
static org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> |
computeRootContainmentFeatures(RootCS csRoot)
Return the containment features ordered so that library and import features are processed before anything else.
|
protected abstract BaseCSVisitor<Continuation<?>> |
createContainmentVisitor(CS2ASConversion cs2asConversion) |
protected CS2ASConversion |
createConversion(org.eclipse.xtext.diagnostics.IDiagnosticConsumer diagnosticsConsumer,
BaseCSResource csResource) |
protected abstract BaseCSVisitor<Element> |
createLeft2RightVisitor(CS2ASConversion cs2asConversion) |
protected abstract BaseCSVisitor<Continuation<?>> |
createPostOrderVisitor(CS2ASConversion converter) |
protected abstract BaseCSVisitor<Continuation<?>> |
createPreOrderVisitor(CS2ASConversion converter) |
void |
dispose() |
ASResource |
getASResource() |
ModelElementCS |
getCSElement(Element pivotElement) |
BaseCSResource |
getCSResource() |
static java.util.List<org.eclipse.xtext.nodemodel.ILeafNode> |
getDocumentationNodes(org.eclipse.xtext.nodemodel.ICompositeNode node) |
static CS2AS.MessageBinder |
getMessageBinder() |
<T extends Element> |
getPivotElement(java.lang.Class<T> pivotClass,
ModelElementCS csElement) |
Element |
getPivotElement(ModelElementCS csElement) |
static org.eclipse.xtext.diagnostics.DiagnosticMessage |
getUnresolvedProxyMessage(org.eclipse.emf.ecore.EReference eReference,
org.eclipse.emf.ecore.EObject csContext,
java.lang.String linkText) |
static java.lang.String |
getUnresolvedProxyText(org.eclipse.emf.ecore.EReference eReference,
org.eclipse.emf.ecore.EObject csContext,
java.lang.String linkText) |
void |
installPivotDefinition(ModelElementCS csElement,
Element newPivotElement)
Install the mapping from a CS element that defines a pivot element to the defined pivot element.
|
void |
installPivotReference(ElementRefCS csElement,
Element newPivotElement,
org.eclipse.emf.ecore.EReference eReference)
Install the mapping from a CS element to a completely independent pivot element.
|
void |
installPivotUsage(ModelElementCS csElement,
Element newPivotElement)
Install the mapping from a CS element to a related pivot element.
|
Iteration |
lookupIteration(ElementCS csElement,
PathNameCS csPathName,
ScopeFilter scopeFilter) |
Operation |
lookupOperation(ElementCS csElement,
PathNameCS csPathName,
ScopeFilter scopeFilter) |
VariableDeclaration |
lookupSelf(ElementCS csElement) |
Type |
lookupType(ElementCS csElement,
PathNameCS csPathName) |
Type |
lookupTypeQualifier(PathNameCS csPathName) |
Type |
lookupTypeValue(ElementCS csElement,
PathNameCS csPathName) |
Element |
lookupUndecoratedName(ElementCS csElement,
PathNameCS csPathName) |
static void |
printDiagnostic(java.lang.String message,
boolean dispose,
int indent) |
static void |
refreshContext(PathNameCS pathNameCS,
ElementCS csContext) |
static void |
refreshElementType(PathElementCS pathElementCS,
org.eclipse.emf.ecore.EClassifier elementType) |
<T extends Element> |
refreshModelElement(java.lang.Class<T> pivotClass,
org.eclipse.emf.ecore.EClass pivotEClass,
ModelElementCS csElement) |
static void |
refreshScopeFilter(PathNameCS pathNameCS,
ScopeFilter scopeFilter) |
static void |
setElementType(PathNameCS pathNameCS,
org.eclipse.emf.ecore.EClass elementType,
ElementCS csContext,
ScopeFilter scopeFilter) |
static CS2AS.MessageBinder |
setMessageBinder(CS2AS.MessageBinder messageBinder)
Define an alternative message binder.
|
static void |
setPathElement(PathNameCS csPathName,
Element element,
java.util.List<? extends org.eclipse.emf.ecore.EObject> ambiguities)
Define the resolution of a PathNameCS explicitly avoiding the need for the normal Xtext proxy resolution.
|
void |
update(org.eclipse.xtext.diagnostics.IDiagnosticConsumer diagnosticsConsumer) |
basicGet, getEnvironmentFactory, getEPackage, getMetamodelManager, getStandardLibrary, isId, refreshList, refreshSet
public static boolean showContext
@NonNull protected final BaseCSResource csResource
@NonNull protected final ASResource asResource
@NonNull protected final CSI2ASMapping csi2asMapping
public CS2AS(@NonNull EnvironmentFactoryInternal environmentFactory, @NonNull BaseCSResource csResource, @NonNull ASResource asResource)
protected CS2AS(@NonNull CS2AS aConverter)
public static org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> computeRootContainmentFeatures(RootCS csRoot)
public static void addUnresolvedProxyMessageProvider(CS2AS.UnresolvedProxyMessageProvider unresolvedProxyMessageProvider)
public static Element basicGetType(TypedTypeRefCS csTypedRef)
@Nullable public static org.eclipse.xtext.diagnostics.DiagnosticMessage getUnresolvedProxyMessage(@NonNull org.eclipse.emf.ecore.EReference eReference, @NonNull org.eclipse.emf.ecore.EObject csContext, @NonNull java.lang.String linkText)
@Nullable public static java.lang.String getUnresolvedProxyText(@NonNull org.eclipse.emf.ecore.EReference eReference, @NonNull org.eclipse.emf.ecore.EObject csContext, @NonNull java.lang.String linkText)
public static java.util.List<org.eclipse.xtext.nodemodel.ILeafNode> getDocumentationNodes(@NonNull org.eclipse.xtext.nodemodel.ICompositeNode node)
public static CS2AS.MessageBinder getMessageBinder()
public static void printDiagnostic(@NonNull java.lang.String message, boolean dispose, int indent)
public static void refreshContext(@NonNull PathNameCS pathNameCS, ElementCS csContext)
public static void refreshElementType(PathElementCS pathElementCS, org.eclipse.emf.ecore.EClassifier elementType)
public static void refreshScopeFilter(@NonNull PathNameCS pathNameCS, ScopeFilter scopeFilter)
public static void setElementType(@NonNull PathNameCS pathNameCS, org.eclipse.emf.ecore.EClass elementType, @NonNull ElementCS csContext, @Nullable ScopeFilter scopeFilter)
public static CS2AS.MessageBinder setMessageBinder(CS2AS.MessageBinder messageBinder)
NLS.bind(String, Object[])
public static void setPathElement(@NonNull PathNameCS csPathName, @Nullable Element element, @Nullable java.util.List<? extends org.eclipse.emf.ecore.EObject> ambiguities)
ambiguities
- @NonNull public java.lang.String bind(@NonNull org.eclipse.emf.ecore.EObject csContext, java.lang.String messageTemplate, java.lang.Object... bindings)
@NonNull protected abstract BaseCSVisitor<Continuation<?>> createContainmentVisitor(@NonNull CS2ASConversion cs2asConversion)
@NonNull protected CS2ASConversion createConversion(@NonNull org.eclipse.xtext.diagnostics.IDiagnosticConsumer diagnosticsConsumer, @NonNull BaseCSResource csResource)
@NonNull protected abstract BaseCSVisitor<Element> createLeft2RightVisitor(@NonNull CS2ASConversion cs2asConversion)
@NonNull protected abstract BaseCSVisitor<Continuation<?>> createPostOrderVisitor(@NonNull CS2ASConversion converter)
@NonNull protected abstract BaseCSVisitor<Continuation<?>> createPreOrderVisitor(@NonNull CS2ASConversion converter)
public void dispose()
@NonNull public ASResource getASResource()
@Nullable public ModelElementCS getCSElement(@NonNull Element pivotElement)
@NonNull public BaseCSResource getCSResource()
public Element getPivotElement(@NonNull ModelElementCS csElement)
@Nullable public <T extends Element> T getPivotElement(@NonNull java.lang.Class<T> pivotClass, @NonNull ModelElementCS csElement)
public void installPivotDefinition(@NonNull ModelElementCS csElement, @NonNull Element newPivotElement)
public void installPivotReference(@NonNull ElementRefCS csElement, @NonNull Element newPivotElement, @NonNull org.eclipse.emf.ecore.EReference eReference)
public void installPivotUsage(@NonNull ModelElementCS csElement, @NonNull Element newPivotElement)
@Nullable public Iteration lookupIteration(@NonNull ElementCS csElement, @NonNull PathNameCS csPathName, @Nullable ScopeFilter scopeFilter)
@Nullable public Operation lookupOperation(@NonNull ElementCS csElement, @NonNull PathNameCS csPathName, @Nullable ScopeFilter scopeFilter)
@Nullable public VariableDeclaration lookupSelf(@NonNull ElementCS csElement)
@Nullable public Type lookupType(@NonNull ElementCS csElement, @NonNull PathNameCS csPathName)
@Nullable public Type lookupTypeQualifier(@NonNull PathNameCS csPathName)
@Nullable public Type lookupTypeValue(@NonNull ElementCS csElement, @NonNull PathNameCS csPathName)
@Nullable public Element lookupUndecoratedName(@NonNull ElementCS csElement, @NonNull PathNameCS csPathName)
@NonNull public <T extends Element> T refreshModelElement(@NonNull java.lang.Class<T> pivotClass, @NonNull org.eclipse.emf.ecore.EClass pivotEClass, @Nullable ModelElementCS csElement)
public void update(@NonNull org.eclipse.xtext.diagnostics.IDiagnosticConsumer diagnosticsConsumer)