Tabnine Logo
ProblemFormatter
Code IndexAdd Tabnine to your IDE (free)

How to use
ProblemFormatter
in
org.apache.royale.compiler.clients.problems

Best Java code snippets using org.apache.royale.compiler.clients.problems.ProblemFormatter (Showing top 16 results out of 315)

origin: org.apache.royale.compiler/compiler-common

  /**
   * Returns a String for displaying this compiler problem in a console window.
   * 
   * This is for debugging purposes, therefore no non-test code should call this.
   * 
   * There are typically four lines output for each problem:
   *  location (file and line number)
   *  description
   *  
   * For example:
   * 
   * C:\Faramir\compiler\trunk\tests\resources\milestones\m1\M1.as:4
   * Syntax error: '+' not allowed here.
   */
  @Override
  public String toString()
  {
    return ProblemFormatter.DEFAULT_FORMATTER.format(this);
  }
}
origin: org.apache.royale.compiler/compiler-common

/**
 * Get a localized string for a parameterized message.
 *  
 * @param id the id of the message.
 * @param parameters map that contains key/value pairs used to resolve the
 * tokens in the specified message.
 * @return resolved, token-free message
 */
public static String getString(String id, Map<String, Object> parameters)
{
  return ProblemFormatter.substitute(getString(id), parameters);
}
 
origin: org.apache.royale.compiler/compiler-common

String problemMessage = getMessage(c.getSimpleName());
return substitute(problemMessage, map);
origin: apache/royale-compiler

public int mainNoExit(final String[] args, OutputStream stderr)
{
  int exitCode = -1;
  try
  {
    exitCode = _mainNoExit(args);
  }
  catch (Exception e)
  {
    PrintWriter writer = new PrintWriter(stderr);
    writer.println(e.toString());
  }
  finally
  {
    final ProblemFormatter formatter = new ProblemFormatter();
    final ProblemPrinter printer = new ProblemPrinter(formatter, stderr);
    printer.printProblems(problems.getFilteredProblems());
  }
  return exitCode;
}
origin: apache/royale-compiler

String problemMessage = getMessage(c.getSimpleName());
return substitute(problemMessage, map);
origin: org.apache.royale.compiler/compiler-externc

public int mainNoExit(final String[] args, OutputStream stderr)
{
  int exitCode = -1;
  try
  {
    exitCode = _mainNoExit(args);
  }
  catch (Exception e)
  {
    PrintWriter writer = new PrintWriter(stderr);
    writer.println(e.toString());
  }
  finally
  {
    final ProblemFormatter formatter = new ProblemFormatter();
    final ProblemPrinter printer = new ProblemPrinter(formatter, stderr);
    printer.printProblems(problems.getFilteredProblems());
  }
  return exitCode;
}
origin: apache/royale-compiler

  /**
   * Returns a String for displaying this compiler problem in a console window.
   * 
   * This is for debugging purposes, therefore no non-test code should call this.
   * 
   * There are typically four lines output for each problem:
   *  location (file and line number)
   *  description
   *  
   * For example:
   * 
   * C:\Faramir\compiler\trunk\tests\resources\milestones\m1\M1.as:4
   * Syntax error: '+' not allowed here.
   */
  @Override
  public String toString()
  {
    return ProblemFormatter.DEFAULT_FORMATTER.format(this);
  }
}
origin: apache/royale-compiler

/**
 * Get a localized string for a parameterized message.
 *  
 * @param id the id of the message.
 * @param parameters map that contains key/value pairs used to resolve the
 * tokens in the specified message.
 * @return resolved, token-free message
 */
public static String getString(String id, Map<String, Object> parameters)
{
  return ProblemFormatter.substitute(getString(id), parameters);
}

origin: apache/royale-compiler

/**
 *  Print a pre-filtered sequence of problems.
 *  
 *  @param problems compiler problems
 *  @return count of printed problems
 */
public int printProblems(final Iterable<ICompilerProblem> problems)
{
  int problemCount = 0;
  PrintWriter writer = new PrintWriter(new PrintStream(outputStream));
  
  for (final ICompilerProblem problem : problems)
  {
    writer.println(formatter.format(problem));
    problemCount++;
  }
  writer.flush();
  return problemCount;
}
origin: org.apache.royale.compiler/compiler-common

/**
 *  Print a pre-filtered sequence of problems.
 *  
 *  @param problems compiler problems
 *  @return count of printed problems
 */
public int printProblems(final Iterable<ICompilerProblem> problems)
{
  int problemCount = 0;
  PrintWriter writer = new PrintWriter(new PrintStream(outputStream));
  
  for (final ICompilerProblem problem : problems)
  {
    writer.println(formatter.format(problem));
    problemCount++;
  }
  writer.flush();
  return problemCount;
}
origin: org.apache.royale.compiler/compiler

public String getProblems()
{
  StringBuffer problems = new StringBuffer();
  if (problemQuery != null && problemQuery.hasFilteredProblems())
  {
    for (final ICompilerProblem problem : problemQuery.getFilteredProblems())
    {
      problems.append(problemFormatter.format(problem));
    }
  }
  return problems.toString().trim();
}
origin: apache/royale-compiler

public String getProblems()
{
  StringBuffer problems = new StringBuffer();
  if (problemQuery != null && problemQuery.hasFilteredProblems())
  {
    for (final ICompilerProblem problem : problemQuery.getFilteredProblems())
    {
      problems.append(problemFormatter.format(problem));
    }
  }
  return problems.toString().trim();
}
origin: org.apache.royale.compiler/compiler

String description = super.format(problem);
origin: apache/royale-compiler

String description = super.format(problem);
origin: apache/royale-compiler

try
  String errText = ProblemFormatter.DEFAULT_FORMATTER.format(prob);
  msg.setMessage(errText);
origin: apache/royale-compiler

try
  String errText = ProblemFormatter.DEFAULT_FORMATTER.format(prob);
  msg.setMessage(errText);
org.apache.royale.compiler.clients.problemsProblemFormatter

Javadoc

Abstract class that provide useful functionality for formatting and retrieving the localized message of CompilerProblem's.

Most used methods

  • format
    Returns a readable description of the problem, by substituting field values for named placeholders s
  • <init>
  • getMessage
    Returns message for the specified key using the resource bundle generated for the specified locale.
  • substitute
    Resolves the tokens in the text using the key/value pairs in the specified map. Each token in the me

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSystemService (Context)
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Table (org.hibernate.mapping)
    A relational table
  • Option (scala)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now