Package com.google.gwt.uibinder.rebind

Examples of com.google.gwt.uibinder.rebind.IndentedWriter


    assertEquals("template_html1()", call);

    // Confirm that we write the correct SafeHtmlTemplates interface

    StringWriter s = new StringWriter();
    IndentedWriter n = new IndentedWriter(new PrintWriter(s));
    h.writeInterface(n);

    String[] expectedInterface = {"interface Template extends SafeHtmlTemplates {", //
        "  @Template(\"<DialogBox id='{0}'>this is a dialog box</DialogBox>\")", //
        "  SafeHtml html1(String arg0);", //
        "   ", //
        "}", //
        "", //
        "Template template = GWT.create(Template.class);", //
    };

    assertExpectedStrings(expectedInterface, s.toString());

    // Confirm that we write template caller methods

    s = new StringWriter();
    n = new IndentedWriter(new PrintWriter(s));
    h.writeTemplateCallers(n);

    String[] expectedCaller = {"SafeHtml template_html1() {", //
        "  return template.html1(domId0);", //
        "}"};
View Full Code Here


    writer.lookupJavaBeanPropertyAccessors(writer.getBeanType());
    writer.lookupNotifyingProperties(writer.getBeanType());

    StringWriter stringWriter = new StringWriter();
    IndentedWriter niceWriter = new IndentedWriter(new PrintWriter(
        stringWriter));
    writer.writeBeanAdapter(niceWriter);

    // System.out.println("=================================");
    // System.out.println(stringWriter.toString());
View Full Code Here

      XMLElement elem) {
    return elemToAttributeMessages.get(elem);
  }

  public void write(PrintWriter printWriter) {
    IndentedWriter writer = new IndentedWriter(printWriter);

    // Package declaration.
    if (packageName.length() > 0) {
      writer.write("package %1$s;", packageName);
      writer.newline();
    }

    // Imports.
    writer.write("import com.google.gwt.i18n.client.Messages;");
    writer.write("import static com.google.gwt.i18n.client.LocalizableResource.*;");
    writer.newline();

    // Open interface.
    genInterfaceAnnotations(writer);
    writer.write("public interface %s extends Messages {", getMessagesClassName());
    writer.newline();
    writer.indent();

    // Write message methods
    for (MessageWriter m : messages) {
      m.writeDeclaration(writer);
    }

    // Close interface.
    writer.outdent();
    writer.write("}");
  }
View Full Code Here

      XMLElement elem) {
    return elemToAttributeMessages.get(elem);
  }

  public void write(PrintWriter printWriter) {
    IndentedWriter writer = new IndentedWriter(printWriter);

    // Package declaration.
    if (packageName.length() > 0) {
      writer.write("package %1$s;", packageName);
      writer.newline();
    }

    // Imports.
    writer.write("import com.google.gwt.i18n.client.Messages;");
    writer.write("import static com.google.gwt.i18n.client.LocalizableResource.*;");
    writer.newline();

    // Open interface.
    genInterfaceAnnotations(writer);
    writer.write("public interface %s extends Messages {", getMessagesClassName());
    writer.newline();
    writer.indent();

    // Write message methods
    for (MessageWriter m : messages) {
      m.writeDeclaration(writer);
    }

    // Close interface.
    writer.outdent();
    writer.write("}");
  }
View Full Code Here

      XMLElement elem) {
    return elemToAttributeMessages.get(elem);
  }

  public void write(PrintWriter printWriter) {
    IndentedWriter writer = new IndentedWriter(printWriter);

    // Package declaration.
    if (packageName.length() > 0) {
      writer.write("package %1$s;", packageName);
      writer.newline();
    }

    // Imports.
    writer.write("import com.google.gwt.i18n.client.Messages;");
    writer.write("import static com.google.gwt.i18n.client.LocalizableResource.*;");
    writer.newline();

    // Open interface.
    genInterfaceAnnotations(writer);
    writer.write("public interface %s extends Messages {", getMessagesClassName());
    writer.newline();
    writer.indent();

    // Write message methods
    for (MessageWriter m : messages) {
      m.writeDeclaration(writer);
    }

    // Close interface.
    writer.outdent();
    writer.write("}");
  }
View Full Code Here

      XMLElement elem) {
    return elemToAttributeMessages.get(elem);
  }

  public void write(PrintWriter printWriter) {
    IndentedWriter writer = new IndentedWriter(printWriter);

    // Package declaration.
    if (packageName.length() > 0) {
      writer.write("package %1$s;", packageName);
      writer.newline();
    }

    // Imports.
    writer.write("import com.google.gwt.i18n.client.Messages;");
    writer.write("import static com.google.gwt.i18n.client.LocalizableResource.*;");
    writer.newline();

    // Open interface.
    genInterfaceAnnotations(writer);
    writer.write("public interface %s extends Messages {", getMessagesClassName());
    writer.newline();
    writer.indent();

    // Write message methods
    for (MessageWriter m : messages) {
      m.writeDeclaration(writer);
    }

    // Close interface.
    writer.outdent();
    writer.write("}");
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.uibinder.rebind.IndentedWriter

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.