/** * 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); } }
/** * 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); } }
/** * 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; }
/** * 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; }
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(); }
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(); }
String description = super.format(problem);
String description = super.format(problem);
try String errText = ProblemFormatter.DEFAULT_FORMATTER.format(prob); msg.setMessage(errText);
try String errText = ProblemFormatter.DEFAULT_FORMATTER.format(prob); msg.setMessage(errText);