org.eclipse.jdt.internal.compiler
Interface IProblemFactory

All Known Implementing Classes:
CancelableProblemFactory, CompletionEngine.CompletionProblemFactory, DefaultProblemFactory, ProblemFactory

public interface IProblemFactory


Method Summary
 CategorizedProblem createProblem(char[] originatingFileName, int problemId, java.lang.String[] problemArguments, int elaborationId, java.lang.String[] messageArguments, int severity, int startPosition, int endPosition, int lineNumber, int columnNumber)
          Answer a new IProblem created according to the parameters values.
 CategorizedProblem createProblem(char[] originatingFileName, int problemId, java.lang.String[] problemArguments, java.lang.String[] messageArguments, int severity, int startPosition, int endPosition, int lineNumber, int columnNumber)
           
 java.util.Locale getLocale()
           
 java.lang.String getLocalizedMessage(int problemId, int elaborationId, java.lang.String[] messageArguments)
          Inject the supplied message arguments into a localized template elaborated from the supplied problem id and an optional elaboration id and return the resulting message.
 java.lang.String getLocalizedMessage(int problemId, java.lang.String[] messageArguments)
           
 

Method Detail

createProblem

CategorizedProblem createProblem(char[] originatingFileName,
                                 int problemId,
                                 java.lang.String[] problemArguments,
                                 java.lang.String[] messageArguments,
                                 int severity,
                                 int startPosition,
                                 int endPosition,
                                 int lineNumber,
                                 int columnNumber)

createProblem

CategorizedProblem createProblem(char[] originatingFileName,
                                 int problemId,
                                 java.lang.String[] problemArguments,
                                 int elaborationId,
                                 java.lang.String[] messageArguments,
                                 int severity,
                                 int startPosition,
                                 int endPosition,
                                 int lineNumber,
                                 int columnNumber)
Answer a new IProblem created according to the parameters values.

Parameters:
originatingFileName - the name of the file from which the problem is originated
problemId - the problem id
problemArguments - the fully qualified arguments recorded inside the problem
elaborationId - the message elaboration id (0 for problems that have no message elaboration)
messageArguments - the arguments needed to set the error message (shorter names than problemArguments ones)
severity - the severity of the problem
startPosition - the start position of the problem
endPosition - the end position of the problem
lineNumber - the line on which the problem occurred
Returns:
a new IProblem created according to the parameters values.

getLocale

java.util.Locale getLocale()

getLocalizedMessage

java.lang.String getLocalizedMessage(int problemId,
                                     java.lang.String[] messageArguments)

getLocalizedMessage

java.lang.String getLocalizedMessage(int problemId,
                                     int elaborationId,
                                     java.lang.String[] messageArguments)
Inject the supplied message arguments into a localized template elaborated from the supplied problem id and an optional elaboration id and return the resulting message. The arguments number should match the highest placeholder index in the template. When an elaboration id is used, the template matching that elaboration id replaces '{0}' into the template matching the problem id before the message arguments are injected.

Parameters:
problemId - the problem id taken from IProblem constants
elaborationId - 0 if the considered problem has no elaboration, a valid elaboration id else
messageArguments - the arguments to inject into the template
Returns:
a localized message elaborated from the supplied problem id, elaboration id and message parameters