Package org.eclipse.jdt.apt.core.util

## Interface EclipseMessager

All Superinterfaces:
  `Messager`

    public interface EclipseMessager
    extends Messager

Extend the APT `Messager` to allow the registrating of diagnostics on ast nodes.

### Field Summary

Fields
`static int` `APT_PROBLEM_ID` Problem ID for APT problems that do not have quick fixes
`static int` `APT_QUICK_FIX_PROBLEM_ID` Problem ID for APT problems that have quick fixes.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `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 Detail

#### APT_PROBLEM_ID

    static final int APT_PROBLEM_ID

Problem ID for APT problems that do not have quick fixes

See Also:
  Constant Field Values

#### APT_QUICK_FIX_PROBLEM_ID

    static final int APT_QUICK_FIX_PROBLEM_ID

Problem 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:
  Constant Field Values

### Method Detail

#### printError

    void printError​(ASTNode node,
                    String msg)

Print an error message on the given AST node. The AST node must came from the AST that is associated with the environment.

Parameters:
  `node` -
  `msg` - the error message
Throws:
  `IllegalArgumentException` - if `node` or `msg` is null. Also, if the node did not come from the ast in the environment.

#### printWarning

    void printWarning​(ASTNode node,
                      String msg)

Print a warning on the given AST node. The AST node must came from the AST that is associated with the environment.

Parameters:
  `node` -
  `msg` - the warning message
Throws:
  `IllegalArgumentException` - if `node` or `msg` is null. Also, if the node did not come from the ast in the environment.

#### printNotice

    void printNotice​(ASTNode node,
                     String msg)

Print a notice on the given AST node. The AST node must came from the AST that is associated with the environment.

Parameters:
  `node` -
  `msg` - the warning message
Throws:
  `IllegalArgumentException` - if `node` or `msg` is null. Also, if the node did not come from the ast in the environment.

#### printFixableError

    void printFixableError​(SourcePosition pos,
                           String msg,
                           String pluginId,
                           String errorId)

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 error
  `msg` - message to display to the user
  `pluginId` - 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

    void printFixableWarning​(SourcePosition pos,
                             String msg,
                             String pluginId,
                             String errorId)

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 error
  `msg` - message to display to the user
  `pluginId` - 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

    void printFixableNotice​(SourcePosition pos,
                            String msg,
                            String pluginId,
                            String errorId)

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 error
  `msg` - message to display to the user
  `pluginId` - 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

    void printFixableError​(String msg,
                           String pluginId,
                           String errorId)

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 user
  `pluginId` - 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

    void printFixableWarning​(String msg,
                             String pluginId,
                             String errorId)

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 user
  `pluginId` - 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

    void printFixableNotice​(String msg,
                            String pluginId,
                            String errorId)

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 user
  `pluginId` - 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.