private IFile createBuildProperties(
     IProject project, IProgressMonitor monitor, PomParser bizPom) {
   String buildPropsTemplate = ResourceHelper.content(templateRoot + "build.properties");
   String bizClientJar = "lib/" + bizPom.getArtifactId() + "-client.jar";
   String buildProps = String.format(buildPropsTemplate, bizClientJar);
   return EclipseHelper.createFile("build.properties", project, buildProps, monitor);
 }
 private IFile createManifest(IProject project, IProgressMonitor monitor, PomParser bizPom) {
   String manifestTemplate = ResourceHelper.content(templateRoot + "MANIFEST.MF");
   String bizClientJar = "lib/" + bizPom.getArtifactId() + "-client.jar";
   String manifest =
       String.format(manifestTemplate, pi.getProjectName(), pi.getProjectId(), bizClientJar);
   IFolder metaInf = project.getFolder("META-INF");
   return EclipseHelper.createFile("MANIFEST.MF", metaInf, manifest, monitor);
 }
 private IFile createGuidesign(IProject project, IProgressMonitor monitor) {
   IFolder resourceFolder = (IFolder) project.findMember("src/main/resources");
   String modelTemplate = ResourceHelper.content(templateRoot + "model.guidesign");
   String path =
       "platform:/resource/" + pi.getBusinessProjectId() + "/src/main/resources/model.btdesign";
   String model =
       String.format(
           modelTemplate, path, pi.getProjectName().replace(" ", ""), resolveBusinessAppName());
   return EclipseHelper.createFile("model.guidesign", resourceFolder, model, monitor);
 }
 private IFile createGeneratorProperties(
     IProject project, IProgressMonitor monitor, PomParser bizPom) {
   IFolder generatorFolder = (IFolder) project.findMember("src/main/resources/generator");
   String genPropsTemplate =
       ResourceHelper.content(templateRoot + "sculptor-gui-generator.properties");
   String bizClientJar = "lib/" + bizPom.getArtifactId() + "-client.jar";
   String genProps =
       String.format(genPropsTemplate, bizClientJar, bizPom.getArtifactId() + "-ear");
   return EclipseHelper.createFile(
       "sculptor-gui-generator.properties", generatorFolder, genProps, monitor);
 }
 private IFile createPom(IProject project, IProgressMonitor monitor, PomParser bizPom)
     throws CoreException {
   String pomTemplate = ResourceHelper.content(templateRoot + "pom.xml");
   String pom =
       String.format(
           pomTemplate,
           bizPom.getGroupId(),
           bizPom.getParentArtifactId(),
           bizPom.getVersion(),
           pi.getProjectId(),
           bizPom.getArtifactId());
   return EclipseHelper.createFile("pom.xml", project, pom, monitor);
 }
 private String parseFileContent(String fileName) throws CoreException {
   // TODO we should use the project path instead of its name, but
   // don't know how to do that
   IWorkspace workspace = ResourcesPlugin.getWorkspace();
   IProject bizProj = workspace.getRoot().getProject(pi.getBusinessProjectId());
   IFile bizFile = bizProj.getFile(fileName);
   if (!bizFile.exists()) {
     throw new RuntimeException("Missing " + fileName + " in business tier project: " + bizFile);
   }
   BufferedReader bizReader;
   try {
     bizReader =
         new BufferedReader(new InputStreamReader(bizFile.getContents(), bizFile.getCharset()));
   } catch (UnsupportedEncodingException e) {
     throw new RuntimeException(e.getMessage(), e);
   }
   return ResourceHelper.content(bizReader);
 }
 private IFile createSpringSchemas(IProject project, IProgressMonitor monitor) {
   IFolder metaInf = project.getFolder("META-INF");
   String springSchemas = ResourceHelper.content(templateRoot + "spring.schemas");
   return EclipseHelper.createFile("spring.schemas", metaInf, springSchemas, monitor);
 }
 private IFile createSpecialCasesExt(IProject project, IProgressMonitor monitor) {
   String specialCases = ResourceHelper.content(templateRoot + "RichClientSpecialCases.ext");
   IFolder generatorFolder = (IFolder) project.findMember("src/main/resources/generator");
   return EclipseHelper.createFile(
       "RichClientSpecialCases.ext", generatorFolder, specialCases, monitor);
 }
 private IFile createWorkflow(IProject project, IProgressMonitor monitor) {
   IFolder generatorFolder = (IFolder) project.findMember("src/main/resources/generator");
   String wf = ResourceHelper.content(templateRoot + "GuiWorkflow.mwe2");
   return EclipseHelper.createFile("GuiWorkflow.mwe2", generatorFolder, wf, monitor);
 }