use of org.eclipse.vorto.codegen.api.DatatypeGeneratorTask in project vorto by eclipse.
the class IOSPlatformGenerator method generate.
@Override
public IGenerationResult generate(InformationModel context, InvocationContext invocationContext, IVortoCodeGenProgressMonitor monitor) throws VortoCodeGeneratorException {
GenerationResultZip outputter = new GenerationResultZip(context, getServiceKey());
ChainedCodeGeneratorTask<InformationModel> generator = new ChainedCodeGeneratorTask<InformationModel>();
generator.addTask(new DatatypeGeneratorTask(new EntityClassTemplate(), new EnumClassTemplate()));
IMapped<InformationModel> mappedElement = invocationContext.getMappedElement(context, "binding");
if (mappedElement.hasAttribute("ble")) {
generator.addTask(new GeneratorTaskFromFileTemplate<InformationModel>(new CoreBluetoothDetectionTemplate()));
generator.addTask(new GeneratorTaskFromFileTemplate<InformationModel>(new DeviceServiceTemplate()));
}
generator.generate(context, invocationContext, outputter);
return outputter;
}
Aggregations