use of org.eclipse.titan.designer.AST.ASN1.ASN1Assignments in project titan.EclipsePlug-ins by eclipse.
the class SpecialASN1Module method createSpecAsss.
/**
* Creates the special assignments by parsing the strings as if they
* were coming from an internal file and creating a module around them.
*
* @return the module of the special assignments created.
*/
private static ASN1Module createSpecAsss() {
if (null != specialAssignmentsModule) {
return specialAssignmentsModule;
}
final ASN1Assignments parsedAssignments = new ASN1Assignments();
ASN1Assignment actualAssignment;
for (String[] assignment : INTERNAL_ASSIGNMENTS) {
actualAssignment = SpecialASN1Module.parseSpecialInternalAssignment(assignment[1], new Identifier(Identifier_type.ID_ASN, assignment[0]));
parsedAssignments.addAssignment(actualAssignment);
}
// null as a project might not be a good idea
specialAssignmentsModule = new ASN1Module(new Identifier(Identifier_type.ID_ASN, INTERNAL_MODULE), null, Tag_types.AUTOMATIC_TAGS, false);
specialAssignmentsModule.setExports(new Exports(true));
specialAssignmentsModule.setImports(new Imports());
specialAssignmentsModule.setAssignments(parsedAssignments);
specialAssignmentsModule.setLocation(NULL_Location.INSTANCE);
specialAssignmentsModule.setScopeName(INTERNAL_MODULE);
final CompilationTimeStamp timestamp = CompilationTimeStamp.getBaseTimestamp();
final ModuleImportationChain referenceChain = new ModuleImportationChain(ModuleImportationChain.CIRCULARREFERENCE, false);
specialAssignmentsModule.checkImports(timestamp, referenceChain, new ArrayList<Module>());
specialAssignmentsModule.check(timestamp);
return specialAssignmentsModule;
}
Aggregations