public final class WorkspaceProblemFormatter extends ProblemFormatter
DEFAULT_FORMATTER
Constructor and Description |
---|
WorkspaceProblemFormatter(Workspace workspace)
Constructor.
|
WorkspaceProblemFormatter(Workspace workspace,
CompilerProblemCategorizer problemCategorizer)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
format(ICompilerProblem problem)
Returns a readable description of the problem, by substituting field
values for named placeholders such as ${name} in the message specified
for this compiler problem.
|
protected String |
getLineText(ICompilerProblem problem)
Gets the text of the line specified problem occured or
null if there is no line information. |
getMessage, substitute
public WorkspaceProblemFormatter(Workspace workspace)
workspace
- workspace that contains files associated with specified
problems.public WorkspaceProblemFormatter(Workspace workspace, CompilerProblemCategorizer problemCategorizer)
workspace
- workspace that contains files associated with specified
problems.problemCategorizer
- a class the categorizes problems into one of the
values in CompilerProblemSeverity
. Adds "Error:" and "Warning:" into
the format of a problem. If null, the problem categories will not be added
to the output.public String format(ICompilerProblem problem)
ProblemFormatter
format
in class ProblemFormatter
problem
- problem whose message to findprotected String getLineText(ICompilerProblem problem)
null
if there is no line information.problem
- problem to processnull
if there
is no line informationCopyright © 2016 The Apache Software Foundation. All rights reserved.