Package com.google.gwt.user.rebind

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


    SourceWriter sw = new StringSourceWriter();
    sw
        .println("new " + ExternalSVGResourcePrototype.class.getName()
            + "(");
    sw.indent();
    sw.println('"' + name + "\",");
    // These are field names
    sw.println(externalSVGUrlIdent + ", " + externalSVGCacheIdent + ", ");
    sw.println(offsets.get(method.getName()).toString());
    sw.outdent();
View Full Code Here


      CssStylesheet stylesheet) throws UnableToCompleteException {
    SourceWriter sw = new StringSourceWriter();
    // Write the expression to create the subtype.
    sw.println("new " + method.getReturnType().getQualifiedSourceName()
        + "() {");
    sw.indent();

    // Methods defined by CssResource interface
    writeEnsureInjected(sw);
    writeGetName(method, sw);
View Full Code Here

      SortedSet<ConfigurationProperty> configProperties) {
    assertUserAgents(logger, possibleValues);

    StringSourceWriter body = new StringSourceWriter();
    body.println("{");
    body.indent();
    writeUserAgentPropertyJavaScript(body, possibleValues, fallback);
    body.outdent();
    body.println("}");

    return body.toString();
View Full Code Here

    // Validate that classes not assigned to one of the interface methods are external
    validateExternalClasses(externalClasses, renamingResult.externalClassCandidate, method, logger);

    SourceWriter sw = new StringSourceWriter();
    sw.println("new " + method.getReturnType().getQualifiedSourceName() + "() {");
    sw.indent();

    writeMethods(logger, context, method, sw, constantDefinitions,
        cssParsingResult.originalConstantNameMapping, renamingResult.mapping);

    sw.outdent();
View Full Code Here

    String outputUrlExpression = context.deploy(resource, null, true);

    SourceWriter sw = new StringSourceWriter();
    // Write the expression to create the subtype.
    sw.println("new " + StaticDataResource.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 com.google.gwt.safehtml.shared.SafeUri getSafeUri() {");
View Full Code Here

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

    sw.println("public com.google.gwt.safehtml.shared.SafeUri getSafeUri() {");
    sw.indent();
    sw.println("return new org.rstudio.core.client.SafeUriStringImpl(" + outputUrlExpression + ");");
    sw.outdent();
    sw.println("}");

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

    sw.println("return new org.rstudio.core.client.SafeUriStringImpl(" + 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

            w.println("}");
            w.println();


            w_switch.println("case " + methodNum + ":");
            w_switch.indent();
            w_switch.print("o." + method.getName() + "(");
            String delim4 = "";
            for (int i = 0; i < method.getParameters().length; i++)
            {
               w_switch.print(delim4);
View Full Code Here

    URL resource = resources[0];

    SourceWriter sw = new StringSourceWriter();
    sw.println("new " + CustomDataResourcePrototype.class.getName() + "(");
    sw.indent();
    sw.println('"' + method.getName() + "\",");
    // We don't care about it actually working, so just use the resource URL
    sw.println(UriUtils.class.getName() + ".fromTrustedString(\"" + resource.toExternalForm() + "\")");
    sw.outdent();
    sw.print(")");
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.