Package com.google.gwt.dev.jjs.ast

Examples of com.google.gwt.dev.jjs.ast.JRunAsync


  @Override
  public boolean visit(JRunAsync x, Context ctx) {
    // Only the runAsync call itself needs cloning, the onSuccess can be shared.
    JExpression runAsyncCall = cloneExpression(x.getRunAsyncCall());
    expression =
        new JRunAsync(x.getSourceInfo(), x.getRunAsyncId(), x.getName(),
            x.hasExplicitClassLiteral(), runAsyncCall, x.getOnSuccessCall());
    return false;
  }
View Full Code Here


  @Override
  public void setUp() {
    // Create some runAsyncs.
    for (int i = 1; i <= NUM_RUNASYNCS; i++) {
      runAsyncs[i] = new JRunAsync(SourceOrigin.UNKNOWN, i, "runAsync" + i, false,
          JNullLiteral.INSTANCE, JNullLiteral.INSTANCE);
    }
  }
View Full Code Here

        logger.branch(TreeLogger.TRACE, "Looking up initial load sequence for split points");
    LinkedHashSet<JRunAsync> asyncsInInitialLoadSequence = new LinkedHashSet<JRunAsync>();

    List<String> initialSequence = config.getStrings(PROP_INITIAL_SEQUENCE);
    for (String runAsyncReference : initialSequence) {
      JRunAsync runAsync = findRunAsync(runAsyncReference, program, branch);
      if (asyncsInInitialLoadSequence.contains(runAsync)) {
        branch.log(TreeLogger.ERROR, "Split point specified more than once: " + runAsyncReference);
      }
      asyncsInInitialLoadSequence.add(runAsync);
    }
View Full Code Here

      branch.log(TreeLogger.ERROR, "More than one runAsync call is labelled with class "
          + refString);
      throw new UnableToCompleteException();
    }
    assert splitPoints.size() == 1;
    JRunAsync result = splitPoints.iterator().next();
    codeSplitterEvent.end();

    return result;
  }
View Full Code Here

              + "be passed to runAsync().");
          return;
        }
        JMethodCall onSuccessCall = new JMethodCall(info, asyncCallback, callbackMethod);

        JRunAsync runAsyncNode = new JRunAsync(info, splitPoint, name, explicitClassLiteral,
            runAsyncCall, onSuccessCall);
        runAsyncs.add(runAsyncNode);
        ctx.replaceMe(runAsyncNode);
      }
    }
View Full Code Here

              + "be passed to runAsync().");
          return;
        }
        JMethodCall onSuccessCall = new JMethodCall(info, asyncCallback, callbackMethod);

        JRunAsync runAsyncNode = new JRunAsync(info, splitPoint, name, explicitClassLiteral,
            runAsyncCall, onSuccessCall);
        runAsyncs.add(runAsyncNode);
        ctx.replaceMe(runAsyncNode);
      }
    }
View Full Code Here

      }
      configurationPropertyInitialSequence = (ConfigurationProperty) property;
    }

    for (String runAsyncReference : configurationPropertyInitialSequence.getValues()) {
      JRunAsync runAsync = findRunAsync(runAsyncReference, program, branch);
      if (asyncsInInitialLoadSequence.contains(runAsync)) {
        branch.log(TreeLogger.ERROR, "Split point specified more than once: " + runAsyncReference);
      }
      asyncsInInitialLoadSequence.add(runAsync);
    }
View Full Code Here

      branch.log(TreeLogger.ERROR, "More than one runAsync call is labelled with class "
          + refString);
      throw new UnableToCompleteException();
    }
    assert splitPoints.size() == 1;
    JRunAsync result = splitPoints.iterator().next();
    codeSplitterEvent.end();

    return result;
  }
View Full Code Here

  @Override
  public boolean visit(JRunAsync x, Context ctx) {
    // Only the runAsync call itself needs cloning, the onSuccess can be shared.
    JExpression runAsyncCall = cloneExpression(x.getRunAsyncCall());
    expression =
        new JRunAsync(x.getSourceInfo(), x.getRunAsyncId(), x.getName(), x.hasExplicitClassLiteral(),
            runAsyncCall, x.getOnSuccessCall());
    return false;
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.jjs.ast.JRunAsync

Copyright © 2018 www.massapicom. 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.