Package com.google.gwt.user.rebind

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


        SourceWriter sourceWriter = composerFactory.createSourceWriter(context, printWriter);
        sourceWriter.print("private Serializer SERIALIZER = new " + realize + "();");
        sourceWriter.print("protected Serializer getSerializer() {return SERIALIZER;}");
        sourceWriter.print("public SerialMode getMode() {return SerialMode." + annotation.mode().name() + ";}");
                sourceWriter.print("public SerialMode getPushMode() {return SerialMode." + annotation.pushmode().name() + ";}");
        sourceWriter.commit(logger);
       
        if (annotation.mode() == SerialMode.DE_RPC) {
          RpcDataArtifact data = new RpcDataArtifact(type.getQualifiedSourceName());
          for (JType t : typesSentToBrowser.getSerializableTypes()) {
            if (!(t instanceof JClassType)) {
View Full Code Here


      if (writer != null) { // Otherwise the class was already created
        new EventBinderWriter(
            logger,
            context.getTypeOracle().getType(GenericEvent.class.getCanonicalName()))
                .writeDoBindEventHandlers(targetType, writer, context.getTypeOracle());
        writer.commit(logger);
      }
      return getFullyQualifiedGeneratedClassName(eventBinderType);
    } catch (NotFoundException e) {
      logger.log(Type.ERROR, "Error generating " + typeName, e);
      throw new UnableToCompleteException();
View Full Code Here

      generateGadgetManifest(logger, typeOracle, sourceType, new PrintWriter(
          new OutputStreamWriter(manifestOut)));
      context.commitResource(logger, manifestOut);

      sw.commit(logger);
    }

    return f.getCreatedClassName();
  }
View Full Code Here

        sw.println("return __" + m.getName() + ";");
        sw.outdent();
        sw.println("}");
      }

      sw.commit(logger);
    }

    return f.getCreatedClassName();
  }
View Full Code Here

      sw.println("return null;");
      sw.outdent();
      sw.println("}-*/;");

      // Write the generated code to disk
      sw.commit(logger);
    }

    // Return the name of the concrete class
    return f.getCreatedClassName();
  }
View Full Code Here

      writeMethods(fragmentContext, propertyAccessors);
      writeFixups(logger, typeOracle, sw, fragmentContext.creatorFixups);

      // Write the generated code to disk
      sw.commit(logger);
    }

    // Return the name of the concrete class
    return f.getCreatedClassName();
  }
View Full Code Here

                composerFactory.setSuperclass(typeName);
                SourceWriter sourceWriter = composerFactory.createSourceWriter(context, printWriter);
                sourceWriter.print("private Serializer SERIALIZER = new " + realize + "();");
                sourceWriter.print("protected Serializer getRPCSerializer() {return SERIALIZER;}");
                sourceWriter.commit(logger);

            } catch (NotFoundException e) {
                logger.log(TreeLogger.ERROR, "", e);
                throw new UnableToCompleteException();
            }
View Full Code Here

        }

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

        w.commit(logger);
    }

    private void printLoadJsBundleData(SourceWriter w, String methodName,
            List<String> methods) {
        SplittingSourceWriter writer = new SplittingSourceWriter(w, methodName,
View Full Code Here

      // TODO(schmitt): Collect errors and log list of them.
      logger.log(TreeLogger.Type.ERROR, e.getMessage(), e);
    }

    if (writer != null) {
      writer.commit(logger);
    }
  }

  private void outputInterfaceMethods(GinjectorBindings bindings, TypeLiteral<?> ginjectorInterface,
      SourceWriteUtil sourceWriteUtil, SourceWriter writer)
View Full Code Here

    outputBindings(bindings, fragments, writer);
    errorManager.checkForError();

    fragments.commitAll();
    writer.commit(logger);
  }

  /**
   * Outputs the top-level injector for the given {@link GinjectorBindings},
   * along with all of its fragments.
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.