Package com.google.gwt.core.ext

Examples of com.google.gwt.core.ext.TreeLogger.log()


      byte[] data, boolean xhrCompatible) throws UnableToCompleteException {
    TreeLogger logger = getLogger();

    // data: URLs are not compatible with XHRs on FF and Safari browsers
    if ((!xhrCompatible) && (data.length < MAX_INLINE_SIZE)) {
      logger.log(TreeLogger.DEBUG, "Inlining", null);

      // This is bad, but I am lazy and don't want to write _another_ encoder
      sun.misc.BASE64Encoder enc = new sun.misc.BASE64Encoder();
      String base64Contents = enc.encode(data).replaceAll("\\s+", "");
View Full Code Here


    // See if filename obfuscation should be enabled
    String enableRenaming = null;
    try {
      enableRenaming = propertyOracle.getPropertyValue(logger, ENABLE_RENAMING);
    } catch (BadPropertyValueException e) {
      logger.log(TreeLogger.ERROR, "Bad value for " + ENABLE_RENAMING, e);
      throw new UnableToCompleteException();
    }

    // Determine the final filename for the resource's file
    String outputName;
View Full Code Here

    if (out != null) {
      try {
        out.write(data);

      } catch (IOException e) {
        logger.log(TreeLogger.ERROR, "Unable to write data to output name "
            + outputName, e);
        throw new UnableToCompleteException();
      }

      // If there's an error, this won't be called and there will be nothing
View Full Code Here

      // If there's an error, this won't be called and there will be nothing
      // created in the output directory.
      context.commitResource(logger, out);

      logger.log(TreeLogger.DEBUG, "Copied " + data.length + " bytes to "
          + outputName, null);
    }

    // Return a Java expression
    return "GWT.getModuleBaseURL() + \"" + outputName + "\"";
View Full Code Here

    TreeLogger logger = context.parentLogger.branch(TreeLogger.DEBUG,
        "Validating task " + getJavaMethodName() + "().", null);
    JClassType jsoType = context.typeOracle.findType(JavaScriptObject.class.getName());

    if ((imported != null) && ((getter != null) || (setter != null))) {
      logger.log(TreeLogger.ERROR, "Imported functions may not be combined "
          + "with bean-style accessors", null);
      return true;
    }

    // If there are no methods attached to a task, we've encountered an
View Full Code Here

    }

    // If there are no methods attached to a task, we've encountered an
    // internal error.
    if (!hasMethods()) {
      logger.log(TreeLogger.ERROR, "No methods for task.", null);
      return true;
    }

    if (constructor != null) {
      JClassType returnType = constructor.getReturnType().isClassOrInterface();
View Full Code Here

      JClassType returnType = constructor.getReturnType().isClassOrInterface();
      JClassType wrapperType = context.typeOracle.findType(JSWrapper.class.getName());

      if (!(jsoType.isAssignableFrom(returnType) || constructor.getEnclosingType().isAssignableFrom(
          returnType))) {
        logger.log(TreeLogger.ERROR,
            "Methods annotated with @gwt.constructor or @gwt.global must "
                + "return a JavaScriptObject or their enclosing class.", null);
        return true;
      }
View Full Code Here

      }

      try {
        if (wrapperType.isAssignableFrom(returnType)
            && JSWrapperGenerator.hasTag(logger, constructor, Global.class) != null) {
          logger.log(TreeLogger.ERROR,
              "Cannot place @gwt.global annotation on JSWrapper methods."
                  + " Apply to the class or interface instead.", null);
          return true;
        }
      } catch (UnableToCompleteException e) {
View Full Code Here

    // Sanity check that we picked up the right setter
    if ((getter != null)
        && (setter != null)
        && !getter.getReturnType().equals(
            generator.getSetterParameter(setter).getType())) {
      logger.log(TreeLogger.ERROR, "Setter " + setter.getName()
          + " has different parameter type " + "from getter "
          + getter.getName(), null);
      return true;
    }
View Full Code Here

    }

    if (exported != null) {
      if (context.readOnly) {
        // If the interface is read-only, we couldn't add the function linkage
        logger.log(TreeLogger.ERROR, "Cannot export function "
            + exported.getName() + " in read-only wrapper.", null);
        return true;

      } else if (!context.maintainIdentity && !exported.isStatic()) {
        // If we have no __gwtPeer object, only allow static methods
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.