use of org.eclipse.vorto.codegen.ui.context.IModelProjectContext in project vorto by eclipse.
the class ProjectCreationTask method run.
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
EclipseProjectGenerator<IModelProjectContext> generator = new EclipseProjectGenerator<IModelProjectContext>(new LocationWrapper(workspaceLocation, projectName));
generator.addNature(XTEXT_NATURE);
for (String nature : getProjectNature()) {
generator.addNature(nature);
}
generator.addTask(getCodeGeneratorTask());
generator.generate(context, InvocationContext.simpleInvocationContext(), monitor);
setIproject(generator.getProject());
IModelProject modelProject = getIotproject(generator.getProject());
modelProject.refresh(monitor);
fireRefreshEvent(modelProject);
} finally {
monitor.done();
}
}
Aggregations