Package org.objectstyle.wolips.templateengine

Examples of org.objectstyle.wolips.templateengine.ComponentEngine


    String projectName = this.parentResource.getProject().getName();
    IPath path = componentFolder.getLocation();
    IPath projectRelativeJavaPath = componentJavaPath.removeFirstSegments(this.parentResource.getProject().getLocation().segmentCount());
    IFolder javaSourceFolder = this.parentResource.getProject().getFolder(projectRelativeJavaPath);
    prepareFolder(javaSourceFolder, monitor);
    ComponentEngine componentEngine = new ComponentEngine();
    try {
      componentEngine.init();
    } catch (Exception e) {
      WizardsPlugin.getDefault().log(e);
      throw new InvocationTargetException(e);
    }
    // TODO: select template in the user interface
//    componentEngine.setSelectedTemplateName(componentEngine.names()[0]);
    componentEngine.setProjectName(projectName);
    componentEngine.setCreateBodyTag(this.createBodyTag);
    componentEngine.setComponentName(this.componentName);
    componentEngine.setPackageName(this.packageName);
    componentEngine.setSuperclassName(this.superclassName);
    componentEngine.setComponentPath(path);
    componentEngine.setApiPath(apiPath);
    componentEngine.setJavaPath(componentJavaPath);
    componentEngine.setCreateApiFile(this.createApiFile);
    componentEngine.setHTMLBodyType(this.htmlBodyType);
    componentEngine.setWOOEncoding(this.wooEncoding);

    try {
      componentEngine.run(new NullProgressMonitor());
      this.parentResource.getProject().refreshLocal(IResource.DEPTH_INFINITE, monitor);
      IResource[] resources = new IResource[] {componentFolderToReveal.findMember(this.componentName + ".java"), componentFolder.findMember(this.componentName + ".wod")};
      page.setResourcesToReveal(resources);
    } catch (Exception e) {
      WizardsPlugin.getDefault().log(e);
View Full Code Here


  /**
   *
   */
  public void testComponentPath() {
    ComponentEngine componentEngine = new ComponentEngine();
    IPath path = new Path("foo");
    componentEngine.setComponentPath(path);
    assertEquals(path, componentEngine.getComponentPath());
  }
View Full Code Here

  /**
   *
   */
  public void testApiPath() {
    ComponentEngine componentEngine = new ComponentEngine();
    IPath path = new Path("foo");
    componentEngine.setApiPath(path);
    assertEquals(path, componentEngine.getApiPath());
  }
View Full Code Here

  /**
   *
   */
  public void testJavaPath() {
    ComponentEngine componentEngine = new ComponentEngine();
    IPath path = new Path("foo");
    componentEngine.setJavaPath(path);
    assertEquals(path, componentEngine.getJavaPath());
  }
View Full Code Here

  /**
   *
   */
  public void testInit() {
    ComponentEngine componentEngine = new ComponentEngine();
    try {
      componentEngine.init();
    } catch (Exception e) {
      assertNull(e);
    }
  }
View Full Code Here

  /**
   *
   */
  public void testSelection() {
    ComponentEngine componentEngine = new ComponentEngine();
    try {
      componentEngine.init();
    } catch (Exception e) {
      assertNull(e);
    }
  }
View Full Code Here

TOP

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

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.