Package com.google.gwt.user.rebind

Examples of com.google.gwt.user.rebind.SourceWriter.indent()


      throws UnableToCompleteException {
    String name = method.getName();

    SourceWriter sw = context.getSourceWriter();
    sw.println("new " + ExternalTextResourcePrototype.class.getName() + "(");
    sw.indent();
    sw.println('"' + name + "\",");
    // These are field names
    sw.println("EXTERNAL_TEXT_URL, EXTERNAL_TEXT_CACHE,");
    sw.println(offsets.get(method.getName()).toString());
    sw.outdent();
View Full Code Here


    SourceWriter sw = context.getSourceWriter();

    sw.print("new ");
    sw.print(SoundResourcePrototype.class.getName());
    sw.println("(");
    sw.indent();
    sw.print("FLASH_ELEMENT, \"");
    sw.print(method.getName());
    sw.print("\", ");
    sw.print(String.valueOf(builder.getIndex(method.getName())));
    sw.print(", ");
View Full Code Here

    String outputUrlExpression = context.addToOutput(resource, false);

    SourceWriter sw = context.getSourceWriter();
    // Write the expression to create the subtype.
    sw.println("new " + DataResource.class.getName() + "() {");
    sw.indent();

    // Convenience when examining the generated code.
    sw.println("// " + resource.toExternalForm());

    sw.println("public String getUrl() {");
View Full Code Here

    // Convenience when examining the generated code.
    sw.println("// " + resource.toExternalForm());

    sw.println("public String getUrl() {");
    sw.indent();
    sw.println("return " + outputUrlExpression + ";");
    sw.outdent();
    sw.println("}");

    sw.println("public String getName() {");
View Full Code Here

    sw.println("return " + outputUrlExpression + ";");
    sw.outdent();
    sw.println("}");

    sw.println("public String getName() {");
    sw.indent();
    sw.println("return \"" + method.getName() + "\";");
    sw.outdent();
    sw.println("}");

    sw.outdent();
View Full Code Here

    URL resource = resources[0];

    SourceWriter sw = context.getSourceWriter();
    // Write the expression to create the subtype.
    sw.println("new " + TextResource.class.getName() + "() {");
    sw.indent();

    // Convenience when examining the generated code.
    sw.println("// " + resource.toExternalForm());

    sw.println("public String getText() {");
View Full Code Here

    // Convenience when examining the generated code.
    sw.println("// " + resource.toExternalForm());

    sw.println("public String getText() {");
    sw.indent();

    TreeLogger transformLogger =
        logger.branch(TreeLogger.DEBUG, "Applying Transformers", null);
    String toWrite =
        ResourceGeneratorUtil.applyTransformations(transformLogger, method,
View Full Code Here

        + "\";");
    sw.outdent();
    sw.println("}");

    sw.println("public String getName() {");
    sw.indent();
    sw.println("return \"" + method.getName() + "\";");
    sw.outdent();
    sw.println("}");

    sw.outdent();
View Full Code Here

        throw new UnableToCompleteException();
      }
    }

    sw.println(") {");
    sw.indent();

    for (Task t : context.tasks) {
      if (t.imported != null) {
        String fieldName = t.getFieldName(logger);
        sw.print("assert JSONWrapperUtil.hasField(");
View Full Code Here

      sw.print(bindingType.getQualifiedSourceName());
      sw.print(" ");
      sw.print(context.objRef);
    }
    sw.println(") /*-{");
    sw.indent();

    // A binding should have been declared void
    context.returnType = JPrimitiveType.VOID;

    if (context.maintainIdentity && params.length == 2) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.