Community
Participate
Working Groups
Hello, Upon calling EclipseMessager.printError()/printWarning()/printNotice method a marker is created for the relevant eclipse resource. The marker has an ID (org.eclipse.jdt.apt.core.internal.AptPlugin.APT_COMPILATION_PROBLEM_MARKER or org.eclipse.jdt.apt.core.internal.AptPlugin.APT_NONRECONCILE_COMPILATION_PROBLEM_MARKER) and a message (displayed in the problems view). What the marker misses is machine-friendly information (such as e.g. error code) which "client" plugins could use to identify whether they are interested in the error. Therefore it probably makes sense to extend the print* methods with arguments for custom error/warning/notice properties. These properties could be represented by a Map<Object, Object> so that annotation processors could supply whatever data they need. Regards, Danail
Hi, Danail. Sorry for the delayed response. It seems like what you are asking for is pretty close to what the PrintFixableXxx() methods do; they accept an errorId which is intended to be machine-readable. Do these methods meet your needs? If not, can you explain your use case in more detail? You mention "client plugins [that] are interested in the error" but I am not sure exactly what you mean.