public class ModelTranslator extends net.ssehub.easy.dslCore.translation.ModelTranslator<ExpressionTranslator>
ModelTranslator.getMessage(int).| Modifier and Type | Class and Description |
|---|---|
private class |
ModelTranslator.EvalBlockResult
Temporary result of evalu block processing.
|
static class |
ModelTranslator.Result
Implements a translation result enabling deferred model loading.
|
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<AttrAssignment,net.ssehub.easy.varModel.model.AttributeAssignment> |
assignmentMapping |
private java.util.Map<TypedefCompound,net.ssehub.easy.varModel.model.datatypes.Compound> |
compoundMapping |
private java.util.Set<org.eclipse.emf.ecore.EObject> |
definitionsProcessed |
private DerivedTypeMetaCompoundAccessVisitor |
derivedTypeVisitor |
private ExpressionTranslator |
expressionTranslator
Contains an expression translator instance.
|
private net.ssehub.easy.basics.modelManagement.IModelProcessingListener<net.ssehub.easy.varModel.model.Project> |
onLoadMsgCleanupListener |
private java.util.Map<TypedefMapping,net.ssehub.easy.varModel.model.datatypes.DerivedDatatype> |
typedefMapping |
private java.util.Map<VariableDeclarationPart,net.ssehub.easy.varModel.model.DecisionVariableDeclaration> |
varMapping |
| Constructor and Description |
|---|
ModelTranslator()
Creates a model translator instance.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
alreadyDefinedError(java.lang.String name,
org.eclipse.emf.ecore.EObject object,
org.eclipse.emf.ecore.EStructuralFeature feature)
Emits an already defined error.
|
private void |
assignComments(net.ssehub.easy.varModel.model.StructuredComment target,
java.util.List<?> elements,
java.util.List<net.ssehub.easy.varModel.model.Comment> comments,
net.ssehub.easy.varModel.model.IModelElement parent)
Assigns the comments in
comments to the corresponding model elements
in elements. |
private void |
assignProjectComment(net.ssehub.easy.varModel.model.Project project,
java.lang.Object element,
net.ssehub.easy.varModel.model.Comment comment)
Assigns a
comment to an element directly assigned to a project and
ensures the existence the structured comment for the project if required. |
private boolean |
attributeAssignmentsResolvable(java.util.List<AttrAssignment> attrAssignments,
TypeContext context,
net.ssehub.easy.varModel.model.IDecisionVariableContainer parent,
boolean force)
Returns whether the assignments in
attrAssignments can be resolved in the given context
and the given parent container. |
private void |
checkCompound(de.uni_hildesheim.sse.ivml.Project eProject,
net.ssehub.easy.varModel.model.datatypes.Compound cmp,
java.util.Map<net.ssehub.easy.varModel.model.datatypes.Compound,TypedefCompound> cmpMapping,
java.util.Map<java.lang.String,net.ssehub.easy.varModel.model.DecisionVariableDeclaration> done)
Checks the given compound.
|
private void |
checkCompounds(de.uni_hildesheim.sse.ivml.Project eProject,
net.ssehub.easy.varModel.model.Project project)
Checks the compounds in this project.
|
private void |
checkDefaultParamSequence(OpDefStatement op,
net.ssehub.easy.varModel.model.DecisionVariableDeclaration[] param)
Checks the sequence of default and non-default parameters.
|
(package private) void |
completeLoading(ResultEntry entry)
Complete loading of a given model.
|
ModelTranslator.Result |
createEmptyResult()
Creates an empty result for failure cases.
|
ModelTranslator.Result |
createModel(VariabilityUnit unit,
java.net.URI uri,
boolean registerSuccessful,
net.ssehub.easy.basics.modelManagement.ImportResolver<net.ssehub.easy.varModel.model.Project> impResolver)
Creates a variability model from a given variability unit.
|
private ResultEntry |
createProject(de.uni_hildesheim.sse.ivml.Project project,
java.net.URI uri,
boolean registerSuccessful,
java.util.List<de.uni_hildesheim.sse.ivml.Project> inProgress,
net.ssehub.easy.basics.modelManagement.ImportResolver<net.ssehub.easy.varModel.model.Project> impResolver)
Creates a variability model from a given ECore representation of a
project.
|
private net.ssehub.easy.varModel.model.StructuredComment |
createStructuredComment(org.eclipse.emf.ecore.EObject object,
TypeContext context,
java.util.List<net.ssehub.easy.varModel.model.Comment> comments)
Creates a structured comment for the given
object in context depending on the
contents of comments, i.e. whether there are comments or not. |
(package private) void |
error(net.ssehub.easy.basics.messages.IIdentifiable exception,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature)
Turns an IVML exception into a xText error.
|
private boolean |
findOperation(net.ssehub.easy.varModel.model.datatypes.IDatatype datatype,
net.ssehub.easy.varModel.model.datatypes.Operation operation,
boolean considerOperand)
Finds an operation on a given datatype.
|
private net.ssehub.easy.varModel.model.Comment |
handleBasicComment(org.eclipse.emf.ecore.EObject object,
TypeContext context)
Handles the comments assigned to the EMF AST element
object. |
protected net.ssehub.easy.varModel.model.Attribute |
processAnnotation(AnnotateTo annotation,
java.lang.String name,
TypeContext context,
net.ssehub.easy.varModel.model.Attribute initial)
Processes the annotation of
name. |
protected void |
processAnnotation(AnnotateTo annotation,
TypeContext context)
Processes an annotation.
|
private boolean |
processAttributeAssignment(AttrAssignment assgn,
TypeContext context,
net.ssehub.easy.varModel.model.IDecisionVariableContainer parent,
boolean process,
boolean force)
Processes an attribute assignment.
|
private void |
processAttributeAssignmentExpressions(java.util.List<AttrAssignment> assignments,
TypeContext context)
Processes all the expressions of attribute assignments.
|
private void |
processAttributeAssignments(java.util.List<AttrAssignment> assignments,
TypeContext context,
boolean force)
Resolves attribute assignments.
|
private boolean |
processCompound(TypedefCompound tcomp,
TypeContext context,
boolean force)
Processes a compound definition.
|
protected void |
processConflict(ConflictStmt conflictStmt,
TypeContext context)
Processes a conflict statement including import restrictions.
|
private void |
processDefinitions(java.util.List<Typedef> typedefs,
java.util.List<VariableDeclaration> vardecls,
java.util.List<AttrAssignment> assignments,
TypeContext context,
boolean force)
Resolve dependencies among type definitions and resolve types in proper
sequence.
|
private void |
processEnum(TypedefEnum tenum,
TypeContext context)
Processes an enum definition.
|
private ModelTranslator.EvalBlockResult |
processEval(Eval eval,
net.ssehub.easy.varModel.model.IModelElement parent,
TypeContext context)
Process an eval block.
|
protected void |
processEval(Eval eval,
TypeContext context,
net.ssehub.easy.varModel.model.datatypes.Compound compound)
Processes an evaluation block.
|
private void |
processExpressions(java.util.List<Typedef> typedefs,
java.util.List<AttrAssignment> assignments,
java.util.List<ExpressionStatement> exprs,
TypeContext context)
Processes all expressions at once and delegates to further processing methods.
|
void |
processExpressionStatement(ExpressionStatement statement,
TypeContext context,
net.ssehub.easy.varModel.model.IDecisionVariableContainer parent,
boolean internal)
Processes an expression statement and adds the result to the project in
context. |
protected void |
processFreeze(Freeze freeze,
TypeContext context)
Processes a freeze block.
|
protected void |
processImport(ImportStmt importStmt,
TypeContext context)
Processes an import statement including import restrictions.
|
protected void |
processInterface(InterfaceDeclaration eIface,
TypeContext context)
Processes an interface.
|
private boolean |
processMapping(TypedefMapping tmapping,
TypeContext context,
boolean force)
Processes a typdef (type mapping).
|
protected boolean |
processOpdef(OpDefStatement op,
TypeContext context,
boolean force)
Processes a custom operation definition and adds it to the type context.
|
private net.ssehub.easy.varModel.cst.ConstraintSyntaxTree |
processOpDefImpl(OpDefStatement op,
TypeContext context,
net.ssehub.easy.varModel.model.IModelElement parent)
Processes an operation definition implementation.
|
private void |
processOpDefs(java.util.List<OpDefStatement> opDefs,
TypeContext context)
Resolve dependencies among operation definitions in proper sequence.
|
private void |
processOpDefs(java.util.List<OpDefStatement> opDefs,
TypeContext context,
boolean force)
Resolves operation definitions.
|
private void |
processTypeDefExpressions(java.util.List<Typedef> typedefs,
TypeContext context)
Processes all the expressions of type definitions.
|
private void |
processTypedefs(java.util.List<Typedef> compounds,
TypeContext context,
boolean force)
Resolves compound type definitions.
|
private boolean |
processVariableDeclaration(VariableDeclaration decl,
TypeContext context,
net.ssehub.easy.varModel.model.IDecisionVariableContainer container,
boolean process,
boolean force)
Process variable declaration
decl add IVML object model
instances to project or compound. |
private void |
processVars(java.util.List<VariableDeclaration> vars,
TypeContext context,
boolean force)
Resolves variable declarations.
|
private void |
resolveAssignments(java.util.List<AttrAssignment> attrAssignments,
TypeContext context,
net.ssehub.easy.varModel.model.IDecisionVariableContainer parent,
boolean force)
Resolves the given assignments in
attrAssignments. |
private void |
resolveDeclarations(java.util.List<VariableDeclaration> varDecls,
TypeContext context,
net.ssehub.easy.varModel.model.IDecisionVariableContainer parent,
boolean force)
Resolves the given declarations in
varDecl. |
private void |
resolveImports(de.uni_hildesheim.sse.ivml.Project input,
net.ssehub.easy.varModel.model.Project project,
java.net.URI uri,
java.util.List<de.uni_hildesheim.sse.ivml.Project> inProgress,
net.ssehub.easy.basics.modelManagement.ImportResolver<net.ssehub.easy.varModel.model.Project> impResolver,
boolean transitiveLoading)
Resolve the imports.
|
private java.lang.String |
toString(java.util.List<VariableDeclarationPart> parts)
Turns variable declaration parts into strings for debugging.
|
private static java.lang.String |
unqualified(net.ssehub.easy.varModel.model.datatypes.IDatatype type)
Returns the unqualified name of
type. |
private boolean |
variableDeclarationsResolvable(java.util.List<VariableDeclaration> varDecls,
TypeContext context,
net.ssehub.easy.varModel.model.IDecisionVariableContainer parent,
boolean force)
Returns whether the declarations in
varDecl can be resolved in the given context
and the given parent container. |
(package private) void |
warning(net.ssehub.easy.varModel.model.IvmlException exception,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature)
Turns an IVML exception into a xText warning.
|
private java.util.Map<TypedefCompound,net.ssehub.easy.varModel.model.datatypes.Compound> compoundMapping
private java.util.Map<AttrAssignment,net.ssehub.easy.varModel.model.AttributeAssignment> assignmentMapping
private java.util.Map<VariableDeclarationPart,net.ssehub.easy.varModel.model.DecisionVariableDeclaration> varMapping
private java.util.Map<TypedefMapping,net.ssehub.easy.varModel.model.datatypes.DerivedDatatype> typedefMapping
private java.util.Set<org.eclipse.emf.ecore.EObject> definitionsProcessed
private DerivedTypeMetaCompoundAccessVisitor derivedTypeVisitor
private net.ssehub.easy.basics.modelManagement.IModelProcessingListener<net.ssehub.easy.varModel.model.Project> onLoadMsgCleanupListener
private ExpressionTranslator expressionTranslator
public ModelTranslator.Result createModel(VariabilityUnit unit, java.net.URI uri, boolean registerSuccessful, net.ssehub.easy.basics.modelManagement.ImportResolver<net.ssehub.easy.varModel.model.Project> impResolver)
unit - the variability unit to be translateduri - the URI of the project to resolve (in order to find the
closest project, may be null)registerSuccessful - successfully created models shall be registered in
VarModelimpResolver - the import resolver (may be null to use a new default import resolver)public ModelTranslator.Result createEmptyResult()
private net.ssehub.easy.varModel.model.Comment handleBasicComment(org.eclipse.emf.ecore.EObject object,
TypeContext context)
object.object - the EMF AST element to analyzecontext - the parent context of the new comment in the IVML object modelprivate void assignProjectComment(net.ssehub.easy.varModel.model.Project project,
java.lang.Object element,
net.ssehub.easy.varModel.model.Comment comment)
comment to an element directly assigned to a project and
ensures the existence the structured comment for the project if required.project - the project to assign toelement - the element to assign tocomment - the comment to be assignedprivate ResultEntry createProject(de.uni_hildesheim.sse.ivml.Project project, java.net.URI uri, boolean registerSuccessful, java.util.List<de.uni_hildesheim.sse.ivml.Project> inProgress, net.ssehub.easy.basics.modelManagement.ImportResolver<net.ssehub.easy.varModel.model.Project> impResolver)
project - the project to be translated.uri - the URI of the project to resolve (in order to find the
closest project, may be null)registerSuccessful - successfully created models shall be registered in
VarModelinProgress - the projects currently being processed at onceimpResolver - the import resolver to use (may be null to use a new default import resolver)private void checkCompounds(de.uni_hildesheim.sse.ivml.Project eProject,
net.ssehub.easy.varModel.model.Project project)
eProject - the AST project instance to check (fallback for messages)project - the corresponding IVML project instanceprivate void checkCompound(de.uni_hildesheim.sse.ivml.Project eProject,
net.ssehub.easy.varModel.model.datatypes.Compound cmp,
java.util.Map<net.ssehub.easy.varModel.model.datatypes.Compound,TypedefCompound> cmpMapping,
java.util.Map<java.lang.String,net.ssehub.easy.varModel.model.DecisionVariableDeclaration> done)
eProject - the AST project instance to check (fallback for messages)cmp - the compound to checkcmpMapping - mapping between compounds and related AST objects for error identificationdone - already known/checked slot declarationsvoid completeLoading(ResultEntry entry)
entry - the result entry on which to complete loadingprivate void resolveImports(de.uni_hildesheim.sse.ivml.Project input,
net.ssehub.easy.varModel.model.Project project,
java.net.URI uri,
java.util.List<de.uni_hildesheim.sse.ivml.Project> inProgress,
net.ssehub.easy.basics.modelManagement.ImportResolver<net.ssehub.easy.varModel.model.Project> impResolver,
boolean transitiveLoading)
input - the Ecore project representationproject - the target projecturi - the physical URI of the projectinProgress - the other projects being resolved at once (in order to avoid loops)impResolver - the import resolver to use (may be null to use a new default import resolver)transitiveLoading - with or without transitive loading (false = lazy, true = force)public void processExpressionStatement(ExpressionStatement statement,
TypeContext context,
net.ssehub.easy.varModel.model.IDecisionVariableContainer parent,
boolean internal)
throws net.ssehub.easy.dslCore.translation.TranslatorException
context.statement - the statement to processcontext - the type context to be consideredparent - the actual (intended) parent of the constraint to be createdinternal - whether the constraint to be created is internal (and shall not be visible to the user)net.ssehub.easy.dslCore.translation.TranslatorException - in case that the processing of the statement
was terminated abnormallyprivate void processExpressions(java.util.List<Typedef> typedefs,
java.util.List<AttrAssignment> assignments,
java.util.List<ExpressionStatement> exprs,
TypeContext context)
typedefs - the type definitions for which expressions shall be resolvedassignments - the attribute assignments for which expressions shall be resolvedexprs - the expressions to be resolvedcontext - the type resolution contextprocessAttributeAssignmentExpressions(List, TypeContext),
processTypeDefExpressions(List, TypeContext)private void processTypeDefExpressions(java.util.List<Typedef> typedefs,
TypeContext context)
typedefs - the type definitions for which expressions shall be resolvedcontext - the type resolution contextprocessExpressions(List, List, List, TypeContext)private void processAttributeAssignmentExpressions(java.util.List<AttrAssignment> assignments,
TypeContext context)
assignments - the attribute assignments for which expressions shall be resolvedcontext - the type resolution contextprocessExpressions(List, List, List, TypeContext)private void processDefinitions(java.util.List<Typedef> typedefs,
java.util.List<VariableDeclaration> vardecls,
java.util.List<AttrAssignment> assignments,
TypeContext context,
boolean force)
typedefs - the type definitionsvardecls - the variable declarationsassignments - the assignmentscontext - the type resolution contextforce - if creation (and related errors) shall be forced or just tested and created on best-effortprivate void processOpDefs(java.util.List<OpDefStatement> opDefs,
TypeContext context)
opDefs - the operation definitionscontext - the type resolution contextprivate void processOpDefs(java.util.List<OpDefStatement> opDefs,
TypeContext context,
boolean force)
opDefs - the operation definitions to be resolved (to be modified as a side effect)context - the type contextforce - if creation (and related errors) shall be forced or just testedprivate void processTypedefs(java.util.List<Typedef> compounds,
TypeContext context,
boolean force)
compounds - the compounds to be resolved (to be modified as a side effect)context - the type contextforce - if creation (and related errors) shall be forced or just testedprivate void processVars(java.util.List<VariableDeclaration> vars,
TypeContext context,
boolean force)
vars - the variables types to be resolved (to be modified as a side
effect)context - the type contextforce - if creation (and related errors) shall be forcedprivate void processAttributeAssignments(java.util.List<AttrAssignment> assignments,
TypeContext context,
boolean force)
assignments - the attribute assignments to be resolved (to be modified as a side effect)context - the type contextforce - if creation (and related errors) shall be forcedprivate java.lang.String toString(java.util.List<VariableDeclarationPart> parts)
parts - the partsprivate boolean processVariableDeclaration(VariableDeclaration decl,
TypeContext context,
net.ssehub.easy.varModel.model.IDecisionVariableContainer container,
boolean process,
boolean force)
throws net.ssehub.easy.dslCore.translation.TranslatorException
decl add IVML object model
instances to project or compound.decl - the variable declarations in the projectcontext - the resolution contextcontainer - optional element to add the instances to instead of
projectprocess - false if the declaration shall not be created but
only tested first, true if creation should be
done in case that the variable declaration can be processedforce - process anyway, don't testtrue if the base type is yet available and the
remaining type resolution was done, false if this
typedef can actually not be processednet.ssehub.easy.dslCore.translation.TranslatorException - in case of any problem during the translationprivate void alreadyDefinedError(java.lang.String name,
org.eclipse.emf.ecore.EObject object,
org.eclipse.emf.ecore.EStructuralFeature feature)
throws net.ssehub.easy.dslCore.translation.TranslatorException
name - the already defined nameobject - the causing Ecore objectfeature - the causing featurenet.ssehub.easy.dslCore.translation.TranslatorException - the corresponding exception alwaysprotected boolean processOpdef(OpDefStatement op,
TypeContext context,
boolean force)
throws net.ssehub.easy.dslCore.translation.TranslatorException
op - the operation definitioncontext - the type context to be consideredforce - if creation (and related errors) shall be forced or just testedtrue if processing was successful, false
if (typically) a function is called which is currently not defined.net.ssehub.easy.dslCore.translation.TranslatorException - in case that the processing of the statement
must be terminated abnormallyprivate static java.lang.String unqualified(net.ssehub.easy.varModel.model.datatypes.IDatatype type)
type.type - the typeprivate void checkDefaultParamSequence(OpDefStatement op,
net.ssehub.easy.varModel.model.DecisionVariableDeclaration[] param)
op - the operation declarationparam - the parameters to checkprivate net.ssehub.easy.varModel.cst.ConstraintSyntaxTree processOpDefImpl(OpDefStatement op,
TypeContext context,
net.ssehub.easy.varModel.model.IModelElement parent)
throws net.ssehub.easy.dslCore.translation.TranslatorException
op - the operation definitioncontext - the type contextparent - the parent model elementnet.ssehub.easy.dslCore.translation.TranslatorException - in case that the processing of the op
must be terminated abnormallyprotected void processInterface(InterfaceDeclaration eIface,
TypeContext context)
context.eIface - the interface to be processedcontext - the type context to be consideredprotected void processAnnotation(AnnotateTo annotation,
TypeContext context)
annotation - the interface to be processedcontext - the type context to be consideredprotected net.ssehub.easy.varModel.model.Attribute processAnnotation(AnnotateTo annotation,
java.lang.String name,
TypeContext context,
net.ssehub.easy.varModel.model.Attribute initial)
name. In case of success, the annotation will be
applied.annotation - the annotation to be processedname - the name of the annotated elementcontext - the type context to be consideredinitial - the initial attribute created in seriesprivate boolean findOperation(net.ssehub.easy.varModel.model.datatypes.IDatatype datatype,
net.ssehub.easy.varModel.model.datatypes.Operation operation,
boolean considerOperand)
datatype - the datatype to search foroperation - the operation to be searched forconsiderOperand - whether the operand of the operations defined in
datatype should be considered as first parameter
of operation, used to match the implicit project
parameter for ambigous operation checkingtrue if the operation was found, false
elseprivate void processEnum(TypedefEnum tenum,
TypeContext context)
throws net.ssehub.easy.dslCore.translation.TranslatorException
tenum - the type definition for the enumcontext - the type context to be considerednet.ssehub.easy.dslCore.translation.TranslatorException - in case that the processing of the statement
must be terminated abnormallyprivate boolean processCompound(TypedefCompound tcomp,
TypeContext context,
boolean force)
throws net.ssehub.easy.dslCore.translation.TranslatorException
tcomp - the type definition for the compoundcontext - the type context to be consideredforce - creation, don't check beforetrue if the base type is yet available and the
remaining type resolution was done, false if this
typedef can actually not be processednet.ssehub.easy.dslCore.translation.TranslatorException - in case that the processing of the tcomp
must be terminated abnormally due to type problemsprivate boolean processAttributeAssignment(AttrAssignment assgn,
TypeContext context,
net.ssehub.easy.varModel.model.IDecisionVariableContainer parent,
boolean process,
boolean force)
throws net.ssehub.easy.dslCore.translation.TranslatorException
assgn - the attribute assignmentcontext - the type context to be consideredparent - the parent containerprocess - the assignment or do only type resolutionforce - creation, don't check beforetrue if the base types is yet available and the
remaining type resolution was done, false if this
assignment can actually not be processednet.ssehub.easy.dslCore.translation.TranslatorException - in case that the processing of the assgn
must be terminated abnormally due to type problemsprivate boolean variableDeclarationsResolvable(java.util.List<VariableDeclaration> varDecls,
TypeContext context,
net.ssehub.easy.varModel.model.IDecisionVariableContainer parent,
boolean force)
throws net.ssehub.easy.dslCore.translation.TranslatorException
varDecl can be resolved in the given context
and the given parent container.varDecls - the variable declarations to be resolvedcontext - the type contextparent - the parent the varDecls shall be inserted intoforce - creation, don't check beforetrue if the declarations are resolvable, false elsenet.ssehub.easy.dslCore.translation.TranslatorException - in case of type problems, resolution problems or type incompatibilitiesprivate boolean attributeAssignmentsResolvable(java.util.List<AttrAssignment> attrAssignments,
TypeContext context,
net.ssehub.easy.varModel.model.IDecisionVariableContainer parent,
boolean force)
throws net.ssehub.easy.dslCore.translation.TranslatorException
attrAssignments can be resolved in the given context
and the given parent container.attrAssignments - the assignments to be resolvedcontext - the type contextparent - the parent the varDecls shall be inserted intoforce - creation, don't check beforetrue if the declarations are resolvable, false elsenet.ssehub.easy.dslCore.translation.TranslatorException - in case of type problems, resolution problems or type incompatibilitiesprivate void resolveDeclarations(java.util.List<VariableDeclaration> varDecls,
TypeContext context,
net.ssehub.easy.varModel.model.IDecisionVariableContainer parent,
boolean force)
throws net.ssehub.easy.dslCore.translation.TranslatorException
varDecl.varDecls - the variable declarations to be resolvedcontext - the type contextparent - the parent the varDecls shall be inserted intoforce - creation, don't check beforenet.ssehub.easy.dslCore.translation.TranslatorException - in case of type problems, resolution problems or type incompatibilitiesprivate void resolveAssignments(java.util.List<AttrAssignment> attrAssignments,
TypeContext context,
net.ssehub.easy.varModel.model.IDecisionVariableContainer parent,
boolean force)
throws net.ssehub.easy.dslCore.translation.TranslatorException
attrAssignments.attrAssignments - the assignments to be resolvedcontext - the type contextparent - the parent the attrAssignments shall be inserted intoforce - creation, don't check beforenet.ssehub.easy.dslCore.translation.TranslatorException - in case of type problems, resolution problems or type incompatibilitiesprivate boolean processMapping(TypedefMapping tmapping,
TypeContext context,
boolean force)
throws net.ssehub.easy.dslCore.translation.TranslatorException
tmapping - the type mapping definitioncontext - the type context to be consideredforce - if creation (and related errors) shall be forced or just testedtrue if the base type is yet available and the
remaining type resolution was done, false if this
typedef can actually not be processednet.ssehub.easy.dslCore.translation.TranslatorException - in case that the processing of the statement
must be terminated abnormallyprotected void processEval(Eval eval,
TypeContext context,
net.ssehub.easy.varModel.model.datatypes.Compound compound)
eval - the evaluation blockcontext - the context for type resolutioncompound - optional compound to add the eval block to, null for adding it to the actual project in
contextprivate ModelTranslator.EvalBlockResult processEval(Eval eval, net.ssehub.easy.varModel.model.IModelElement parent, TypeContext context)
eval - the evaluation blockparent - the parent elementcontext - the context for type resolutionprotected void processFreeze(Freeze freeze,
TypeContext context)
freeze - the freeze blockcontext - the type context to be consideredprivate net.ssehub.easy.varModel.model.StructuredComment createStructuredComment(org.eclipse.emf.ecore.EObject object,
TypeContext context,
java.util.List<net.ssehub.easy.varModel.model.Comment> comments)
object in context depending on the
contents of comments, i.e. whether there are comments or not.object - the EObject to create the comment forcontext - the type context to assign the created context tocomments - the comments to considerprivate void assignComments(net.ssehub.easy.varModel.model.StructuredComment target,
java.util.List<?> elements,
java.util.List<net.ssehub.easy.varModel.model.Comment> comments,
net.ssehub.easy.varModel.model.IModelElement parent)
comments to the corresponding model elements
in elements.target - the structured comment to store the mapping inelements - the elements to be assigned to the commentscomments - the comments (must be of same size)parent - the explicit parent element of the commentsprotected void processImport(ImportStmt importStmt,
TypeContext context)
importStmt - the import statementcontext - the type context to be consideredprotected void processConflict(ConflictStmt conflictStmt,
TypeContext context)
conflictStmt - the conflict statementcontext - the type context to be consideredvoid error(net.ssehub.easy.basics.messages.IIdentifiable exception,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature)
exception - the exception to usedcause - the cause (as instance of the EMF grammar model)causeFeature - the cause of the feature as an appropriate constant from
de.uni_hildesheim.sse.ivml.IvmlPackage.Literalsvoid warning(net.ssehub.easy.varModel.model.IvmlException exception,
org.eclipse.emf.ecore.EObject cause,
org.eclipse.emf.ecore.EStructuralFeature causeFeature)
exception - the exception to usedcause - the cause (as instance of the EMF grammar model)causeFeature - the cause of the feature as an appropriate constant from
de.uni_hildesheim.sse.ivml.IvmlPackage.LiteralsCopyright © 2009 - 2018 SSE. All Rights Reserved.