Package com.google.gxp.compiler.base

Examples of com.google.gxp.compiler.base.Root


   * an EscapedTree.
   */
  public EscapedTree apply(PlaceholderInsertedTree tree) {
    AlertSetBuilder alertSetBuilder = new AlertSetBuilder(tree.getAlerts());
    Worker worker = new Worker(alertSetBuilder);
    Root root = worker.apply(tree.getRoot());

    return new EscapedTree(tree.getSourcePosition(), alertSetBuilder.buildAndClear(), root);
  }
View Full Code Here


* href="https://www.corp.google.com/eng/designdocs/gxp/java-rewrite/#new-style-space-collapsing">new-style
* space collapsing</a>.
*/
public class SpaceCollapser implements Function<BoundTree,SpaceCollapsedTree> {
  public SpaceCollapsedTree apply(BoundTree tree) {
    Root root = tree.getRoot().acceptVisitor(new SearchingVisitor());
    return new SpaceCollapsedTree(tree.getSourcePosition(), tree.getAlerts(), root);
  }
View Full Code Here

public class PlaceholderPivoter implements Function<ContentFlattenedTree, PlaceholderPivotedTree> {

  public PlaceholderPivotedTree apply(ContentFlattenedTree tree) {
    AlertSetBuilder alertSetBuilder = new AlertSetBuilder(tree.getAlerts());
    Worker worker = new Worker(alertSetBuilder);
    Root root = tree.getRoot().acceptVisitor(worker.defaultVisitor);

    return new PlaceholderPivotedTree(tree.getSourcePosition(), alertSetBuilder.buildAndClear(),
                                      root);
  }
View Full Code Here

    Parts parts = groupParts(alertSetBuilder, parseTree, noAttrs, children);

    // Throw out all but the first Root. The parse phase should have
    // already complained about there being too many roots.
    List<Root> roots = parts.getRoots();
    Root root = roots.isEmpty()
        ? new NullRoot(parseTree, TemplateName.parseFullyQualifiedDottedName(className))
        : roots.get(0);
    return new ReparentedTree(parseTree.getSourcePosition(),
                              alertSetBuilder.buildAndClear(),
                              root);
View Full Code Here

TOP

Related Classes of com.google.gxp.compiler.base.Root

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.