Community
Participate
Working Groups
Using the spacewar example, the following works fine: ajdoc -private -d doc spacewar coordination but the following breaks: ajdoc -public -d doc spacewar coordination The end of the failing output is below. Display.html and Display.DisplayAspect.html were not generated as the types are not public, so presumably the decorator shouldn't be looking for them in this case. > Decorating html files... > Decorating C:\aspectj1.2\doc\examples\doc\spacewar\Debug.html... > Decorating C:\aspectj1.2\doc\examples\doc\spacewar\Display.DisplayAspect.html. .. An internal error occured in ajdoc Please copy the following text into an email message and send it, along with any additional information you can add to: aspectj-dev@eclipse.org java.io.FileNotFoundException: C:\aspectj1.2\doc\examples\doc\spacewar\Display.D isplayAspect.html (The system cannot find the file specified) java.io.FileNotFoundException: C:\aspectj1.2\doc\examples\doc\spacewar\Display.D isplayAspect.html (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at java.io.FileReader.<init>(FileReader.java:55) at org.aspectj.tools.ajdoc.HtmlDecorator.decorateHTMLFile(HtmlDecorator. java:142) at org.aspectj.tools.ajdoc.HtmlDecorator.decorateHTMLFromDecl(HtmlDecora tor.java:115) at org.aspectj.tools.ajdoc.HtmlDecorator.decorateHTMLFromDecls(HtmlDecor ator.java:54) at org.aspectj.tools.ajdoc.HtmlDecorator.decorateHTMLFromInputFiles(Html Decorator.java:43) at org.aspectj.tools.ajdoc.Main.main(Main.java:210)
Fixed. This turned out to be a trickier problem, and I expanded the CoverageTestCase and SpacewarTestCase tests to cover it more thoroughly. In a nutshell, the compiler's AST makes any nested aspect "public" accessiblity, whether it is declared "package" or "private" visibility. This results in a mismmatch between the structure model and the source code. I was tempted to fix this by making the structure model treat those aspects as private. However, this would be a somewhat time consuming operation since it would need to parse the original source code rather than relying on the AST. So instead I made ajdoc treat this case correctly. PLEASE NOTE THE SIDE-EFFECT of keeping this behavior: the outline view will continue to show private/package nested aspects as public, sine that's what's in the bytecode.
Matt - I've just checked in a new org.aspectj.ajde with Miks fix in it - can you test it?
I've verified the fix from AJDT. Thanks guys.
Fix released as part of AspectJ 1.2.1