Package org.objectstyle.wolips.templateengine

Examples of org.objectstyle.wolips.templateengine.TemplateEngine


    File src = new File(path + File.separator + "src");
    src.mkdirs();
    File bin = new File(path + File.separator + "bin");
    bin.mkdirs();
    // project.close(nullProgressMonitor);
    TemplateEngine templateEngine = new TemplateEngine();
    templateEngine.init();
    templateEngine.getWolipsContext().setProjectName(projectName);
    templateEngine.addTemplate(new TemplateDefinition("jarproject/.classpath.vm", path, ".classpath", ".classpath"));
    templateEngine.addTemplate(new TemplateDefinition("jarproject/.project.vm", path, ".project", ".project"));
    templateEngine.addTemplate(new TemplateDefinition("jarproject/build.xml.vm", path, "build.xml", "build.xml"));
    templateEngine.addTemplate(new TemplateDefinition("jarproject/build.properties.vm", path, "build.properties", "build.properties"));
    templateEngine.run(progressMonitor);
  }
View Full Code Here


      throw new InvocationTargetException(new Exception("Wrong parent resource - check validation"));
    }
    subprojectFolder.create(false, true, monitor);

    String path = subprojectFolder.getLocation().toOSString();
    TemplateEngine templateEngine = new TemplateEngine();
    try {
      templateEngine.init();
    } catch (Exception e) {
      WizardsPlugin.getDefault().log(e);
      throw new InvocationTargetException(e);
    }
    templateEngine.getWolipsContext().setProjectName(subprojectName);
    templateEngine.addTemplate(new TemplateDefinition("subproject/PB.project.vm", path, "PB.project", "PB.project"));
    try {
      templateEngine.run(new NullProgressMonitor());
    } catch (Exception e) {
      WizardsPlugin.getDefault().log(e);
      throw new InvocationTargetException(e);
    }
View Full Code Here

    createJavaPackageSupport(project, packagePath);

    File bin = new File(path + File.separator + "bin");
    bin.mkdirs();

    TemplateEngine templateEngine = new TemplateEngine();
    templateEngine.init();
    templateEngine.getWolipsContext().setProjectName(projectName);
    templateEngine.getWolipsContext().setPackageName(packageName);

    addMavenComponentDefinition(pathRoot, templateEngine, path, "Main", packagePath);
    addMavenComponentDefinition(pathRoot, templateEngine, path, "MenuHeader", packagePath);
    addMavenComponentDefinition(pathRoot, templateEngine, path, "PageWrapper", packagePath);

    templateEngine.addTemplate(new TemplateDefinition(pathRoot+"/Application.java.vm", fullSrcPath, "Application.java", "Application.java"));
    templateEngine.addTemplate(new TemplateDefinition(pathRoot+"/DirectAction.java.vm", fullSrcPath, "DirectAction.java", "DirectAction.java"));
    templateEngine.addTemplate(new TemplateDefinition(pathRoot+"/Session.java.vm", fullSrcPath, "Session.java", "Session.java"));

    templateEngine.addTemplate(new TemplateDefinition(pathRoot+"/.classpath.vm", path, ".classpath", ".classpath"));
    templateEngine.addTemplate(new TemplateDefinition(pathRoot+"/.project.vm", path, ".project", ".project"));
    templateEngine.addTemplate(new TemplateDefinition(pathRoot+"/build.xml.vm", path, "build.xml", "build.xml"));
    templateEngine.addTemplate(new TemplateDefinition(pathRoot+"/build.properties.vm", path, "build.properties", "build.properties"));
    templateEngine.addTemplate(new TemplateDefinition(pathRoot+"/Properties.vm", path, "Properties", "Properties"));
    templateEngine.addTemplate(new TemplateDefinition(pathRoot+"/user.d2wmodel.vm", path, "user.d2wmodel", "user.d2wmodel"));

    createWebServicesSupport(project, templateEngine);

    templateEngine.run(progressMonitor);

  }
View Full Code Here

TOP

Related Classes of org.objectstyle.wolips.templateengine.TemplateEngine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.