Package com.google.gxp.compiler.base

Examples of com.google.gxp.compiler.base.Template$TemplateCallable


                      param(list(attr("type", "String"),
                                 attr("default", "\"xyzzy\""),
                                 attr("name", "s")))));
    ReparentedTree output = reparent(parseTree);
    assertOneRoot(output);
    Template root = getTemplate(output.getRoot());
    assertEquals(TEMPLATE_NAME, root.getName());
    assertEquals(0, root.getImports().size());
    List<Parameter> params = root.getParameters();
    assertEquals(2, params.size());
    assertEquals("x", params.get(0).getPrimaryName());
    assertEquals("int",
                 ((NativeType) params.get(0).getType()).getNativeType(OutputLanguage.JAVA));
    assertEquals(null, params.get(0).getDefaultValue());
    assertEquals("s", params.get(1).getPrimaryName());
    assertEquals("String",
                 ((NativeType) params.get(1).getType()).getNativeType(OutputLanguage.JAVA));
    Expression defValue = params.get(1).getDefaultValue();
    assertEquals("\"xyzzy\"", ((NativeExpression) defValue).getDefaultNativeCode());
    assertEmptyValue(root.getContent());
  }
View Full Code Here


                      tag("img", list(attr("src", "Uno"))),
                      tag("p", list(attr("class", "Dos"))),
                      tag("div", list(attr("id", "Windows")))));
    ReparentedTree output = reparent(parseTree);
    assertOneRoot(output);
    Template root = getTemplate(output.getRoot());
    assertEquals(TEMPLATE_NAME, root.getName());
    assertEquals(0, root.getImports().size());
    assertEquals(0, root.getParameters().size());
    CollapseExpression collapse = (CollapseExpression) root.getContent();
    Concatenation kids = (Concatenation) collapse.getSubexpression();
    assertEquals(3, kids.getValues().size());
    assertEquals("img",
                 ((OutputElement) kids.getValues().get(0)).getLocalName());
    assertEquals("p",
View Full Code Here

      List<Parameter> parameters = nodeParts.getParameters();
      List<FormalTypeParameter> formalTypeParameters = nodeParts.getFormalTypeParameters();
      Expression content = getCollapsableContent(attrMap);

      if (contentType != null) {
        output.accumulate(new Template(node,
                                       name,
                                       contentType.getSchema(),
                                       javaAnnotations,
                                       constructor,
                                       imports,
View Full Code Here

TOP

Related Classes of com.google.gxp.compiler.base.Template$TemplateCallable

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.