Examples of buildAndClear()


Examples of com.google.gxp.compiler.alerts.AlertSetBuilder.buildAndClear()

                                   oldRoot.getImports());

    Root newRoot = oldRoot.acceptVisitor(
        new Visitor(alertSetBuilder, schemaFactory, serviceDirectory, requirements));

    return new BoundTree(reparentedTree.getSourcePosition(), alertSetBuilder.buildAndClear(),
                         newRoot, requirements);
  }

  private static class Visitor extends ExhaustiveExpressionVisitor
      implements CallVisitor<Expression>, ImplementsVisitor<ImplementsDeclaration> {
View Full Code Here

Examples of com.google.gxp.compiler.alerts.AlertSetBuilder.buildAndClear()

   * compile as an {@link AlertSet}
   */
  public AlertSet call() {
    AlertSetBuilder alertSetBuilder = new AlertSetBuilder();
    call(alertSetBuilder);
    return alertSetBuilder.buildAndClear();
  }

  /**
   * Executes compilation and passes the {@code Alert}s generated by
   * compile to the {@link AlertSink}
View Full Code Here

Examples of com.google.gxp.compiler.alerts.AlertSetBuilder.buildAndClear()

  public ValidatedTree apply(EscapedTree tree) {
    AlertSetBuilder alertSetBuilder = new AlertSetBuilder(tree.getAlerts());
    Root root = tree.getRoot().acceptVisitor(new Visitor(alertSetBuilder));

    return new ValidatedTree(tree.getSourcePosition(), alertSetBuilder.buildAndClear(), root);
  }

  private static class Visitor extends ExhaustiveExpressionVisitor
      implements CallVisitor<Call>, ImplementsVisitor<Void> {
    private final AlertSink alertSink;
View Full Code Here

Examples of com.google.gxp.compiler.alerts.AlertSetBuilder.buildAndClear()

  public ContentFlattenedTree apply(ValidatedTree tree) {
    AlertSetBuilder alertSetBuilder = new AlertSetBuilder(tree.getAlerts());
    Root root = tree.getRoot().acceptVisitor(new Visitor(alertSetBuilder));

    return new ContentFlattenedTree(tree.getSourcePosition(), alertSetBuilder.buildAndClear(),
                                    root);
  }

  /**
   * Visits the nodes of a ValidatedTree, and "flattens" certain nodes.  The
View Full Code Here

Examples of com.google.gxp.compiler.alerts.AlertSetBuilder.buildAndClear()

    AlertSetBuilder alertSetBuilder = new AlertSetBuilder();
    SourcePosition sourcePosition = new SourcePosition("<test>");
    assertTrue(nsSet.get(alertSetBuilder, sourcePosition,
                         "http://google.com/2001/gxp")
               instanceof GxpNamespace);
    assertTrue(alertSetBuilder.buildAndClear().isEmpty());
    assertTrue(nsSet.get(alertSetBuilder, sourcePosition,
                         "http://google.com/2001/gxp/expressions")
               instanceof ExprNamespace);
    assertTrue(alertSetBuilder.buildAndClear().isEmpty());
    assertTrue(nsSet.get(alertSetBuilder, sourcePosition,
View Full Code Here

Examples of com.google.gxp.compiler.alerts.AlertSetBuilder.buildAndClear()

               instanceof GxpNamespace);
    assertTrue(alertSetBuilder.buildAndClear().isEmpty());
    assertTrue(nsSet.get(alertSetBuilder, sourcePosition,
                         "http://google.com/2001/gxp/expressions")
               instanceof ExprNamespace);
    assertTrue(alertSetBuilder.buildAndClear().isEmpty());
    assertTrue(nsSet.get(alertSetBuilder, sourcePosition,
                         "http://google.com/2001/gxp/call")
               instanceof CallNamespace);
    assertTrue(alertSetBuilder.buildAndClear().isEmpty());
    assertTrue(nsSet.get(alertSetBuilder, sourcePosition,
View Full Code Here

Examples of com.google.gxp.compiler.alerts.AlertSetBuilder.buildAndClear()

               instanceof ExprNamespace);
    assertTrue(alertSetBuilder.buildAndClear().isEmpty());
    assertTrue(nsSet.get(alertSetBuilder, sourcePosition,
                         "http://google.com/2001/gxp/call")
               instanceof CallNamespace);
    assertTrue(alertSetBuilder.buildAndClear().isEmpty());
    assertTrue(nsSet.get(alertSetBuilder, sourcePosition,
                         "http://www.w3.org/1999/xhtml")
               instanceof OutputNamespace);
    assertTrue(alertSetBuilder.buildAndClear().isEmpty());
  }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.AlertSetBuilder.buildAndClear()

               instanceof CallNamespace);
    assertTrue(alertSetBuilder.buildAndClear().isEmpty());
    assertTrue(nsSet.get(alertSetBuilder, sourcePosition,
                         "http://www.w3.org/1999/xhtml")
               instanceof OutputNamespace);
    assertTrue(alertSetBuilder.buildAndClear().isEmpty());
  }

  public void testFailedMapping() throws Exception {
    AlertSetBuilder alertSetBuilder = new AlertSetBuilder();
    nsSet.get(alertSetBuilder, new SourcePosition("<test>"),
View Full Code Here

Examples of com.google.gxp.compiler.alerts.AlertSetBuilder.buildAndClear()

  public void testFailedMapping() throws Exception {
    AlertSetBuilder alertSetBuilder = new AlertSetBuilder();
    nsSet.get(alertSetBuilder, new SourcePosition("<test>"),
              "http://google.com/i/dont/exist");
    Alert alert = Iterables.getOnlyElement(alertSetBuilder.buildAndClear());
    assertTrue(alert instanceof UnknownNamespaceError);
  }
}
View Full Code Here

Examples of com.google.gxp.compiler.alerts.AlertSetBuilder.buildAndClear()

    AlertSetBuilder builder = new AlertSetBuilder();

    testCodeGenPath(gxpSource, filterAlertSink(builder), outputLanguage);

    // Validate the list of (non-info) alerts)
    assertEquals(expectedAlerts, builder.buildAndClear());

    // Get output.
    String outputSystemFilename =
        "inmemory/gxp/test/Main" + outputLanguage.getSuffix(0);
    String code = getCodeFor(outputSystemFilename);
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.