Examples of BadNodePlacementError


Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

      this.outsideMessageVisitor = Preconditions.checkNotNull(outsideMessageVisitor);
    }

    @Override
    public Expression visitUnextractedMessage(UnextractedMessage msg) {
      alertSink.add(new BadNodePlacementError(msg, rootNoMsg));
      return msg.acceptVisitor(outsideMessageVisitor);
    }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

      return msg.acceptVisitor(outsideMessageVisitor);
    }

    @Override
    public Expression visitNoMessage(NoMessage noMsg) {
      alertSink.add(new BadNodePlacementError(noMsg, rootNoMsg));
      return noMsg.getSubexpression().acceptVisitor(this);
    }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

      return noMsg.getSubexpression().acceptVisitor(this);
    }

    @Override
    public Expression visitPlaceholderNode(PlaceholderNode ph) {
      alertSink.add(new BadNodePlacementError(ph, rootNoMsg));
      return ph.getContent().acceptVisitor(this);
    }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

  public void testCall_nonEmptyNonContainer() throws Exception {
    String startCall = "<my:" + getTemplateBaseName() + ">";
    String endCall = "</my:" + getTemplateBaseName() + ">";
    compile(startCall + "stuff inside" + endCall);
    SourcePosition errorPos = pos(2, endCall.length());
    assertAlert(new BadNodePlacementError(errorPos, "text",
                                          "inside " + startCall));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

        "callee", "<gxp:param content-type='text/html' name='x'/>");
    FileRef caller = createFile("caller",
                                "<call:callee>foo</call:callee>",
                                "<my:callee>foo</my:callee>");
    compileFiles(callee, caller);
    assertAlert(new BadNodePlacementError(pos(2, 14), "text",
                                          "inside <call:callee>"));
    assertAlert(new MissingAttributeError(pos(2, 1), "<call:callee>", "x"));
    assertAlert(new BadNodePlacementError(pos(3, 12), "text",
                                          "inside <my:callee>"));
    assertAlert(new MissingAttributeError(pos(3, 1), "<my:callee>", "x"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

      return value.getSubexpression().acceptVisitor(this);
    }

    @Override
    protected Void defaultVisitExpression(Expression node) {
      alertSink.add(new BadNodePlacementError(node, msg));
      return null;
    }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

    assertNoUnexpectedAlerts();
  }

  public void testOutputElement_nonEmptyNoEndTagElement() throws Exception {
    compile("<br>foo</br>");
    assertAlert(new BadNodePlacementError(pos(2,5), "text", "inside <br>"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

    assertNoUnexpectedAlerts();
  }

  public void testOutputElement_tagsInChildlessElement() throws Exception {
    compile("<br>foo!</br>");
    assertAlert(new BadNodePlacementError(pos(2,5), "text", "inside <br>"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

    compile("<gxp:if cond='false'>",
            "<gxp:elif cond='true'>",
            "  some text",
            "</gxp:elif>",
            "</gxp:if>");
    assertAlert(new BadNodePlacementError(pos(3,23), "text",
                                          "inside <gxp:elif>"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

Examples of com.google.gxp.compiler.alerts.common.BadNodePlacementError

    assertNoUnexpectedAlerts();
  }

  public void testElif_notInIf() throws Exception {
    compile("<gxp:elif cond='false' />");
    assertAlert(new BadNodePlacementError(pos(2,1), "<gxp:elif>", "here"));
    assertNoUnexpectedAlerts();
  }
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.