Package com.github.sommeri.less4j.utils

Examples of com.github.sommeri.less4j.utils.ProblemsPrinter


    printWarnings(lessFileName, rootLessFile, content);
  }

  public void printWarnings(String inputfileName, File rootInputFile, CompilationResult content) {
    SourceNamePrinter sourceNamePrinter = new RelativeFileSourceNamePrinter(rootInputFile);
    ProblemsPrinter problemsPrinter = new ProblemsPrinter(sourceNamePrinter);

    if (!content.getWarnings().isEmpty())
      standardErr.println("Warnings produced by compilation of " + inputfileName);

    String warnings = problemsPrinter.printWarnings(content.getWarnings());
    standardErr.print(warnings);
  }
View Full Code Here


    reportErrors(ex, inputfileName, rootInputFile);
  }

  public void reportErrors(Less4jException ex, String inputfileName, File rootInputFile) {
    SourceNamePrinter sourceNamePrinter = new RelativeFileSourceNamePrinter(rootInputFile);
    ProblemsPrinter problemsPrinter = new ProblemsPrinter(sourceNamePrinter);

    if (!ex.getErrors().isEmpty())
      standardErr.println("Errors produced by compilation of " + inputfileName);

    String errors = problemsPrinter.printErrors(ex.getErrors());
    standardErr.print(errors);
  }
View Full Code Here

  public String getMessage() {
    return message;
  }

  private String createMessage() {
    ProblemsPrinter problemsPrinter = new ProblemsPrinter();
   
    StringBuilder builder = new StringBuilder("Could not compile less. ");
    builder.append(errors.size()).append(" error(s) occurred:\n");
   
    List<Problem> visibleErrors = ArraysUtils.safeSublist(errors, 0, SHOW_ERRORS);
    String visibleErrorsStr = problemsPrinter.printErrors(visibleErrors);
    builder.append(visibleErrorsStr);
   
    if (errors.size()>SHOW_ERRORS)
      builder.append("...\n");
   
View Full Code Here

TOP

Related Classes of com.github.sommeri.less4j.utils.ProblemsPrinter

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.