Search in sources :

Example 1 with IGeneratorProjectContext

use of org.eclipse.vorto.codegen.ui.context.IGeneratorProjectContext in project vorto by eclipse.

the class ProjectCreationTask method createGeneratorProject.

private void createGeneratorProject(IProgressMonitor monitor) {
    EclipseProjectGenerator<IGeneratorProjectContext> generator = new EclipseProjectGenerator<IGeneratorProjectContext>(new LocationWrapper(context.getWorkspaceLocation(), context.getPackageName() + "." + context.getGeneratorName().toLowerCase()));
    generator.pluginNature(new PluginBuildFileTemplate(), new ManifestFileTemplate(), "src", "xtend-gen");
    generator.addNature(MavenNature.MAVEN_NATURE_STRING);
    generator.addTask(new GeneratorTemplate());
    generator.addTask(new PomTemplate());
    generator.addTask(new PluginXMLFileTemplate());
    generator.generate(context, InvocationContext.simpleInvocationContext(), monitor);
}
Also used : MicroServicePomTemplate(org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.MicroServicePomTemplate) PomTemplate(org.eclipse.vorto.codegen.ui.wizard.generation.templates.PomTemplate) IGeneratorProjectContext(org.eclipse.vorto.codegen.ui.context.IGeneratorProjectContext) EclipseProjectGenerator(org.eclipse.vorto.codegen.ui.tasks.EclipseProjectGenerator) LocationWrapper(org.eclipse.vorto.codegen.ui.tasks.LocationWrapper) PluginBuildFileTemplate(org.eclipse.vorto.codegen.ui.wizard.generation.templates.PluginBuildFileTemplate) GeneratorTemplate(org.eclipse.vorto.codegen.ui.wizard.generation.templates.GeneratorTemplate) PluginXMLFileTemplate(org.eclipse.vorto.codegen.ui.wizard.generation.templates.PluginXMLFileTemplate) ManifestFileTemplate(org.eclipse.vorto.codegen.ui.wizard.generation.templates.ManifestFileTemplate)

Example 2 with IGeneratorProjectContext

use of org.eclipse.vorto.codegen.ui.context.IGeneratorProjectContext in project vorto by eclipse.

the class ProjectCreationTask method createMicroServiceProject.

private void createMicroServiceProject(IProgressMonitor monitor) throws JavaModelException {
    EclipseProjectGenerator<IGeneratorProjectContext> generator = new EclipseProjectGenerator<>(new LocationWrapper(context.getWorkspaceLocation(), context.getPackageName() + ".service"));
    generator.mavenNature(new MicroServicePomTemplate(), "src/main/java", "src/main/resources", "src/test/java");
    generator.addTask(new PlatformGeneratorMainTemplate());
    generator.addTask(new ApplicationPropertiesTemplate());
    generator.addTask(new ApplicationProfileProperties());
    generator.generate(context, InvocationContext.simpleInvocationContext(), monitor);
}
Also used : MicroServicePomTemplate(org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.MicroServicePomTemplate) IGeneratorProjectContext(org.eclipse.vorto.codegen.ui.context.IGeneratorProjectContext) EclipseProjectGenerator(org.eclipse.vorto.codegen.ui.tasks.EclipseProjectGenerator) LocationWrapper(org.eclipse.vorto.codegen.ui.tasks.LocationWrapper) ApplicationPropertiesTemplate(org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.ApplicationPropertiesTemplate) PlatformGeneratorMainTemplate(org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.PlatformGeneratorMainTemplate) ApplicationProfileProperties(org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.ApplicationProfileProperties)

Aggregations

IGeneratorProjectContext (org.eclipse.vorto.codegen.ui.context.IGeneratorProjectContext)2 EclipseProjectGenerator (org.eclipse.vorto.codegen.ui.tasks.EclipseProjectGenerator)2 LocationWrapper (org.eclipse.vorto.codegen.ui.tasks.LocationWrapper)2 MicroServicePomTemplate (org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.MicroServicePomTemplate)2 GeneratorTemplate (org.eclipse.vorto.codegen.ui.wizard.generation.templates.GeneratorTemplate)1 ManifestFileTemplate (org.eclipse.vorto.codegen.ui.wizard.generation.templates.ManifestFileTemplate)1 PluginBuildFileTemplate (org.eclipse.vorto.codegen.ui.wizard.generation.templates.PluginBuildFileTemplate)1 PluginXMLFileTemplate (org.eclipse.vorto.codegen.ui.wizard.generation.templates.PluginXMLFileTemplate)1 PomTemplate (org.eclipse.vorto.codegen.ui.wizard.generation.templates.PomTemplate)1 ApplicationProfileProperties (org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.ApplicationProfileProperties)1 ApplicationPropertiesTemplate (org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.ApplicationPropertiesTemplate)1 PlatformGeneratorMainTemplate (org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.PlatformGeneratorMainTemplate)1