Package com.google.gwt.user.rebind

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


      sw.indent();
      sw.println("nativeInit();");
      sw.println("init((" + userPrefsType.getQualifiedSourceName()
          + ")GWT.create(" + userPrefsType.getQualifiedSourceName()
          + ".class));");
      sw.outdent();
      sw.println("}");

      sw.println("private native void nativeInit() /*-{");
      sw.indent();
      for (JClassType interfaceType : sourceType.getImplementedInterfaces()) {
View Full Code Here


      sw.indent();
      for (JClassType interfaceType : sourceType.getImplementedInterfaces()) {
        generateFeatureInitializer(logger, typeOracle, sw, sourceType,
            interfaceType);
      }
      sw.outdent();
      sw.println("}-*/;");

      // Write out the manifest
      OutputStream manifestOut = context.tryCreateResource(logger, typeName
          + ".gadget.xml");
View Full Code Here

            + extendsPreferenceType.getParameterizedQualifiedSourceName()
            + " __" + m.getName() + " = ");
        sw.indent();
        writeInstantiation(logger, sw, extendsPreferenceType, m);
        sw.println(";");
        sw.outdent();

        // public FooProperty property() { return __property; }
        sw.print("public ");
        sw.print(m.getReadableDeclaration(true, true, true, true, true));
        sw.println("{");
View Full Code Here

        sw.print("public ");
        sw.print(m.getReadableDeclaration(true, true, true, true, true));
        sw.println("{");
        sw.indent();
        sw.println("return __" + m.getName() + ";");
        sw.outdent();
        sw.println("}");
      }

      sw.commit(logger);
    }
View Full Code Here

      throw new UnableToCompleteException();
    }

    sw.println(rect.left + ", 0, " + rect.width + ", " + rect.height);

    sw.outdent();
    sw.print(")");
  }

  @Override
  public void writeFields(TreeLogger logger) throws UnableToCompleteException {
View Full Code Here

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

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

          sw.print("private final "
              + m.getReturnType().getQualifiedSourceName() + " " + fieldName
              + " = ");
View Full Code Here

      sw.println("return new ResourcePrototype[] {");
      sw.indent();
      for (String fieldName : fieldNames) {
        sw.println(fieldName + ",");
      }
      sw.outdent();
      sw.println("};");
      sw.outdent();
      sw.println("}");

      // Allow map-style lookup
View Full Code Here

      for (String fieldName : fieldNames) {
        sw.println(fieldName + ",");
      }
      sw.outdent();
      sw.println("};");
      sw.outdent();
      sw.println("}");

      // Allow map-style lookup
      sw.println("public native ResourcePrototype "
          + "getResource(String name) /*-{");
 
View Full Code Here

      for (JMethod m : methods) {
        sw.println("case '" + m.getName() + "': return this.@"
            + f.getCreatedClassName() + "::"
            + (m.getName() + "_instance").toUpperCase() + ";");
      }
      sw.outdent();
      sw.println("}");
      sw.println("return null;");
      sw.outdent();
      sw.println("}-*/;");

 
View Full Code Here

            + (m.getName() + "_instance").toUpperCase() + ";");
      }
      sw.outdent();
      sw.println("}");
      sw.println("return null;");
      sw.outdent();
      sw.println("}-*/;");

      // Write the generated code to disk
      sw.commit(logger);
    }
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.