Package org.eclipse.jdt.apt.core.util
Interface EclipseMessager
- All Superinterfaces:
Messager
Extend the APT
Messager
to allow the registrating of diagnostics on ast nodes.-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Problem ID for APT problems that do not have quick fixesstatic final int
Problem ID for APT problems that have quick fixes. -
Method Summary
Modifier and TypeMethodDescriptionvoid
printError
(ASTNode node, String msg) Print an error message on the given AST node.void
printFixableError
(SourcePosition pos, String msg, String pluginId, String errorId) Print an error including the given arguments for use in quick-fixes.void
printFixableError
(String msg, String pluginId, String errorId) Print an error including the given arguments for use in quick-fixes.void
printFixableNotice
(SourcePosition pos, String msg, String pluginId, String errorId) Print a notice including the given arguments for use in quick-fixes.void
printFixableNotice
(String msg, String pluginId, String errorId) Print a notice including the given arguments for use in quick-fixes.void
printFixableWarning
(SourcePosition pos, String msg, String pluginId, String errorId) Print a warning including the given arguments for use in quick-fixes.void
printFixableWarning
(String msg, String pluginId, String errorId) Print a warning including the given arguments for use in quick-fixes.void
printNotice
(ASTNode node, String msg) Print a notice on the given AST node.void
printWarning
(ASTNode node, String msg) Print a warning on the given AST node.Methods inherited from interface com.sun.mirror.apt.Messager
printError, printError, printNotice, printNotice, printWarning, printWarning
-
Field Details
-
APT_PROBLEM_ID
static final int APT_PROBLEM_IDProblem ID for APT problems that do not have quick fixes- See Also:
-
APT_QUICK_FIX_PROBLEM_ID
static final int APT_QUICK_FIX_PROBLEM_IDProblem ID for APT problems that have quick fixes. If an APT plugin wants to write a quick-fix for their problems, they should look for this ID. see org.eclipse.jdt.ui.text.java.IQuickAssistProcessor- See Also:
-
-
Method Details
-
printError
Print an error message on the given AST node. The AST node must came from the AST that is associated with the environment.- Parameters:
msg
- the error message- Throws:
IllegalArgumentException
- ifnode
ormsg
is null. Also, if the node did not come from the ast in the environment.
-
printWarning
Print a warning on the given AST node. The AST node must came from the AST that is associated with the environment.- Parameters:
msg
- the warning message- Throws:
IllegalArgumentException
- ifnode
ormsg
is null. Also, if the node did not come from the ast in the environment.
-
printNotice
Print a notice on the given AST node. The AST node must came from the AST that is associated with the environment.- Parameters:
msg
- the warning message- Throws:
IllegalArgumentException
- ifnode
ormsg
is null. Also, if the node did not come from the ast in the environment.
-
printFixableError
Print an error including the given arguments for use in quick-fixes. Any APT Quick Fix processors (@see IAPTQuickFixProcessor) registered with the provided pluginId and errorId will then get called if the user attempt to quick-fix that error.- Parameters:
pos
- position of the errormsg
- message to display to the userpluginId
- plugin which will provide an apt quick fix processor for this error. Cannot be null.errorId
- a plugin-provided error code which will be meaningful to the quick fix processor (e.g. "invalidAnnotationValue", etc.) Cannot be null.
-
printFixableWarning
Print a warning including the given arguments for use in quick-fixes. Any APT Quick Fix processors (@see IAPTQuickFixProcessor) registered with the provided pluginId and errorId will then get called if the user attempt to quick-fix that warning.- Parameters:
pos
- position of the errormsg
- message to display to the userpluginId
- plugin which will provide an apt quick fix processor for this error. Cannot be null.errorId
- a plugin-provided error code which will be meaningful to the quick fix processor (e.g. "invalidAnnotationValue", etc.) Cannot be null.
-
printFixableNotice
Print a notice including the given arguments for use in quick-fixes. Any APT Quick Fix processors (@see IAPTQuickFixProcessor) registered with the provided pluginId and errorId will then get called if the user attempt to quick-fix that notice.- Parameters:
pos
- position of the errormsg
- message to display to the userpluginId
- plugin which will provide an apt quick fix processor for this error. Cannot be null.errorId
- a plugin-provided error code which will be meaningful to the quick fix processor (e.g. "invalidAnnotationValue", etc.) Cannot be null.
-
printFixableError
Print an error including the given arguments for use in quick-fixes. Any APT Quick Fix processors (@see IAPTQuickFixProcessor) registered with the provided pluginId and errorId will then get called if the user attempt to quick-fix that error.- Parameters:
msg
- message to display to the userpluginId
- plugin which will provide an apt quick fix processor for this error. Cannot be null.errorId
- a plugin-provided error code which will be meaningful to the quick fix processor (e.g. "invalidAnnotationValue", etc.) Cannot be null.
-
printFixableWarning
Print a warning including the given arguments for use in quick-fixes. Any APT Quick Fix processors (@see IAPTQuickFixProcessor) registered with the provided pluginId and errorId will then get called if the user attempt to quick-fix that warning.- Parameters:
msg
- message to display to the userpluginId
- plugin which will provide an apt quick fix processor for this error. Cannot be null.errorId
- a plugin-provided error code which will be meaningful to the quick fix processor (e.g. "invalidAnnotationValue", etc.) Cannot be null.
-
printFixableNotice
Print a notice including the given arguments for use in quick-fixes. Any APT Quick Fix processors (@see IAPTQuickFixProcessor) registered with the provided pluginId and errorId will then get called if the user attempt to quick-fix that notice.- Parameters:
msg
- message to display to the userpluginId
- plugin which will provide an apt quick fix processor for this error. Cannot be null.errorId
- a plugin-provided error code which will be meaningful to the quick fix processor (e.g. "invalidAnnotationValue", etc.) Cannot be null.
-