use of org.eclipse.vorto.codegen.hono.model.FunctionblockTemplate in project vorto by eclipse.
the class EclipseHonoGenerator method generate.
@Override
public IGenerationResult generate(InformationModel model, InvocationContext context, IVortoCodeGenProgressMonitor monitor) {
GenerationResultZip output = new GenerationResultZip(model, getServiceKey());
ChainedCodeGeneratorTask<InformationModel> generator = new ChainedCodeGeneratorTask<InformationModel>();
generator.addTask(new GeneratorTaskFromFileTemplate<InformationModel>(new PomFileTemplate()));
generator.addTask(new GeneratorTaskFromFileTemplate<InformationModel>(new Log4jTemplate()));
generator.addTask(new GeneratorTaskFromFileTemplate<InformationModel>(new CertificateTemplate()));
generator.addTask(new GeneratorTaskFromFileTemplate<InformationModel>(new AppTemplate()));
generator.addTask(new GeneratorTaskFromFileTemplate<InformationModel>(new IDataServiceTemplate()));
generator.addTask(new GeneratorTaskFromFileTemplate<InformationModel>(new HonoDataService()));
generator.addTask(new GeneratorTaskFromFileTemplate<InformationModel>(new HonoMqttClientTemplate()));
generator.addTask(new GeneratorTaskFromFileTemplate<InformationModel>(new InformationModelTemplate()));
generator.generate(model, context, output);
for (FunctionblockProperty fbProperty : model.getProperties()) {
new GeneratorTaskFromFileTemplate<>(new FunctionblockTemplate(model)).generate(fbProperty.getType(), context, output);
}
return output;
}
Aggregations