Revert "Always run javadoc using the ToolProvider API"
This reverts commit f70aeb5e, except for some commented-out parts of
code and an unused method. I also simplified the code, e.g. with regard
to exception handling, and did some more cosmetic stuff, but basically
it is a revert.
In order to make it compile on more recent JDKs which doe not have class
com.sun.tools.javadoc.Main, I used Class.forName in the method being
called on JDK 8 only.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Reports on declarations of Collection variables made by using the collection class as the type, rather than an appropriate interface.
Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
The version handling in LangUtil has been overhauled
to cope better with post 1.8 releases (JDK9 and JDK10 or 18.3
or whatever they call it). As part of this moved
to treating JDK9 as '9' rather than '1.9'. Also removed
duplicate version processing logic and had that defer to
the one place in LangUtil where we now deal with it.
Includes some generics tidyup in ajdoc. More ajdoc work
is necessary for Java10 because it removes the standard doclet
(old style). However trying to invoke the internal Javadoc
handler in Java10 is failing due to module visibility rules.
I just committed the final round of updates to ajdoc needed for 1.2. In a nutshell it's moved forward a ways from the previous ajdoc:
- AJDT integration works
- generates documentation for all the AspectJ modules
- works on 1.3 and 1.4
- comments and Javadoc tags are properly preserved and resolved
Note that the hope is still for "declare" documentation to come in the form of a contribution.
Getting it to work for our tree involved a bunch of bug fixes to deal with things like anonymous types. To run from our tree in bootstrap mode use something like the attached batch script.
I had to roll back some of Andy's fix to broken links: getRelativeComponent didn't work properly for internal anchor links (..html#<mumble>). Andy, could you check this against the current thing against whatever was breaking for you, and ideally add that code patter to CoverageTestCase?
I added -XjavadocsInModel to make the addition of Javadoc strings to the ASM only happen when request it (prevent bloat of the model with strings. The running time of ajdoc is now dominated by the compilation time.