Examples of indent()


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

        // writeAssignment() on the ResourceGenerator
        for (JMethod m : generatorMethods) {
          // Strip off all but the access modifiers
          sw.print(m.getReadableDeclaration(false, true, true, true, true));
          sw.println(" {");
          sw.indent();

          String fieldName = (m.getName() + "_instance").toUpperCase();
          fieldNames.add(fieldName);
          sw.println("return " + fieldName + ";");
View Full Code Here

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

            "Finishing ResourceGenerator", null));
      }

      // Complete the IRB contract
      sw.println("public ResourcePrototype[] getResources() {");
      sw.indent();
      sw.println("return new ResourcePrototype[] {");
      sw.indent();
      for (String fieldName : fieldNames) {
        sw.println(fieldName + ",");
      }
View Full Code Here

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

      // Complete the IRB contract
      sw.println("public ResourcePrototype[] getResources() {");
      sw.indent();
      sw.println("return new ResourcePrototype[] {");
      sw.indent();
      for (String fieldName : fieldNames) {
        sw.println(fieldName + ",");
      }
      sw.outdent();
      sw.println("};");
View Full Code Here

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

      sw.println("}");

      // Allow map-style lookup
      sw.println("public native ResourcePrototype "
          + "getResource(String name) /*-{");
      sw.indent();
      sw.println("switch (name) {");
      sw.indent();
      for (JMethod m : methods) {
        sw.println("case '" + m.getName() + "': return this.@"
            + f.getCreatedClassName() + "::"
View Full Code Here

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

      // Allow map-style lookup
      sw.println("public native ResourcePrototype "
          + "getResource(String name) /*-{");
      sw.indent();
      sw.println("switch (name) {");
      sw.indent();
      for (JMethod m : methods) {
        sw.println("case '" + m.getName() + "': return this.@"
            + f.getCreatedClassName() + "::"
            + (m.getName() + "_instance").toUpperCase() + ";");
      }
View Full Code Here

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

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

    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

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

    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

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

    // 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

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

    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
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.