6877202: Elements.getDocComment() is not getting JavaDocComments

6861094: javac -Xprint <file> does not print comments
6985205: access to tree positions and doc comments may be lost across annotation processing rounds

Reviewed-by: darcy
This commit is contained in:
Jonathan Gibbons 2010-09-27 14:20:39 -07:00
parent 26f967ece4
commit 2730836d77
19 changed files with 785 additions and 122 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -107,9 +107,6 @@ public class JavadocTool extends com.sun.tools.javac.main.JavaCompiler {
// force the use of Messager as a Log
messager = Messager.instance0(context);
// force the use of the scanner that captures Javadoc comments
DocCommentScanner.Factory.preRegister(context);
return new JavadocTool(context);
} catch (CompletionFailure ex) {
messager.error(Position.NOPOS, ex.getMessage());