On Mon, 17 May 2021 20:04:49 GMT, Jonathan Gibbons <j...@openjdk.org> wrote:

> Please review a change to overhaul the javadoc support for diagnostics to 
> better leverage the support available in javac. This includes the ability for 
> all javadoc diagnostics to show a "source line and caret" to indicate the 
> position of a reported issue. As a side-effect, it normalizes the formatting 
> of javadoc messages, to be consistent with javac messages.
> 
> The primary changes are in the javadoc `Messager` class, and are primarily 
> focussed "downward" on the internal use of the javac `Log.report` method, 
> which is the nexus for reporting methods. There is additional cleanup that 
> could be done in `Messager` in the API it provides to clients, but (for the 
> most part) that is not done in this work.
> 
> Additional changes are done to facilitate writing a test for this work, and 
> reflect the current shortcomings of the existing `Doclet` API. Most notably:
> * changes in `Utils` to allow a user-defined taglet to override a built-in 
> taglet
> * changes in `TagletManager` and `Workarounds` to allow a user-defined taglet 
> to access internal API, to workaround API that would be useful to provide on 
> `StandardDoclet`
> 
> There are a few minor specific cleanup changes in code style and/or improved 
> comments.
> 
> There is one primary new test, `TestDiagsLineCaret.java` which exercises 
> different kinds of diagnostics at different positions in a file, to verify 
> that the source line and a caret are produced as appropriate.
> 
> There are additional test changes triggered by the slight change in the 
> format of error messages.  Most notably, prefixes like `error -` and `warning 
> -` become `error:` and `warning:`.

This pull request has now been integrated.

Changeset: b4d4884c
Author:    Jonathan Gibbons <j...@openjdk.org>
URL:       
https://git.openjdk.java.net/jdk/commit/b4d4884c03b03d3073ef137a899f3612993f5e65
Stats:     935 lines in 37 files changed: 629 ins; 103 del; 203 mod

8267126: javadoc should show "line and caret" for diagnostics.

Reviewed-by: prappo

-------------

PR: https://git.openjdk.java.net/jdk/pull/4074

Reply via email to