Package com.google.caja.reporting

Examples of com.google.caja.reporting.MessageQueue.addMessage()


  public boolean run() {
    try {
      boolean success = getCompilationPipeline().apply(jobs);
      long t1 = System.nanoTime();
      MessageQueue mq = jobs.getMessageQueue();
      mq.addMessage(
          MessageType.COMPILER_DONE,
          MessagePart.Factory.valueOf((int) ((t1 - t0) / 1e6)),
          MessagePart.Factory.valueOf((int) (slowestTime / 1e6)),
          MessagePart.Factory.valueOf(slowestStage));
      return success;
View Full Code Here


      URI baseUri = baseUri(node, job.getBaseUri(), dom.getFilePosition());
      if (baseUri != null) {
        try {
          baseUri = URI.create(UriUtil.normalizeUri(baseUri.toString()));
        } catch (URISyntaxException ex) {
          mq.addMessage(
              PluginMessageType.MALFORMED_URL, dom.getFilePosition(),
              MessagePart.Factory.valueOf(baseUri.toString()));
          baseUri = null;
        }
      }
View Full Code Here

    final MessageQueue errs = new EchoingMessageQueue(
        err, mc, false);
    RenderContext rc = new RenderContext(
        new JsMinimalPrinter(new Concatenator(out, new Callback<IOException>() {
          public void handle(IOException ex) {
            errs.addMessage(
                MessageType.IO_ERROR,
                MessagePart.Factory.valueOf(ex.getMessage()));
          }
        })));
View Full Code Here

    try {
      DomParser p = new DomParser(new HtmlLexer(cp), false, is, mq);
      inputNode = new Dom(p.parseFragment());
      p.getTokenQueue().expectEmpty();
    } catch (ParseException e) {
      mq.addMessage(e.getCajaMessage());
      okToContinue = false;
    }

    if (okToContinue && inputNode != null) {
      compiler.addInput(inputNode, uri);
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.